input: 
  def create_people_dict(names_and_ages: str) -> dict:
      """
      Convert a string of names and ages into a dictionary with names as keys and ages as values.
      The input format is "Name1 (age1), Name2 (age2), ..., NameN (ageN)".
  
      >>> create_people_dict("John (20), Jane (40), Alex (18), Peter (45)")
      {'John': 20, 'Jane': 40, 'Alex': 18, 'Peter': 45}
      """
  
output:     people_dict = {}
      entries = names_and_ages.split(", ")
      for entry in entries:
          name, age = entry.split(" (")
          age = int(age.rstrip(")"))
          people_dict[name] = age
      return people_dict