code: def convert_time_to_hour_minute(hour, minute, convention):
      
      if hour is None:
          hour = 0
      if minute is None:
          minute = 0
      if convention is None:
          convention = 'am'
  
      hour = int(hour)
      minute = int(minute)
  
      if convention.lower() == 'pm':
          hour += 12
  
      return {'hours': hour, 'minutes': minute}
docs: Convert time to hour, minute