input: Write a python function to convert a 24-hour format time string to a 12-hour format time string.
  assert convert_time("23:15") == "11:15"
  assert convert_time("13:45") == "1:45"
  assert convert_time("00:05") == "12:05"
  assert convert_time("12:30") == "12:30"
  assert convert_time("08:00") == "8:00"
output: def convert_time(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:02}"