input: Write a python function to convert a given time in 24-hour format to 12-hour AM/PM format.
  assert convert_time_format("13:15") == "1:15 PM"
  assert convert_time_format("00:30") == "12:30 AM"
  assert convert_time_format("12:45") == "12:45 PM"
  assert convert_time_format("23:59") == "11:59 PM"
output: def convert_time_format(time_24):
      hours, minutes = map(int, time_24.split(':'))
      period = "AM" if hours < 12 else "PM"
      hours = hours % 12
      if hours == 0:
          hours = 12
      return f"{hours}:{minutes:02d} {period}"