input: Write a Python function called `get_latest_time` that takes a string `s` as input, which represents a 12-hour format time with some digits possibly replaced by `?`. The function should replace all `?` characters with digits such that the resulting string is a valid 12-hour format time and is the latest possible one. The function should return this resulting string.
  
  '''
  def get_latest_time(s: str) -> str:
      """
      You're provided with a string s that depicts a 12-hour format time where certain digits (or none) might be switched out with '?'.
  
      The time format "HH:MM" is used where HH ranges from 00 to 11, and MM ranges from 00 to 59. The minimal 12-hour time is 00:00 and the maximum is 11:59.
  
      Your task is to fill in every "?" character in s with digits to form a valid 12-hour format time that is the latest possible.
  
      Return the final string.
  
      Examples:
      >>> s = "2?:?8"
      "02:58"
      >>> s = "0?:?1"
      "09:51"
  
      Constraints:
      s.length == 5
      s[2] must be the character ":".
      All characters besides s[2] are digits or "?" characters.
      The input is constructed such that there's at least one valid time between "00:00" and "11:59" after replacing the "?" characters.
      """
  '''
output: def get_latest_time(s: str) -> str:
      if s[0] == '?':
          if '0' <= s[1] <= '9' or s[1] == '?':
              s = '1' + s[1:]
          else:
              s = '0' + s[1:]
      if s[1] == '?':
          if s[0] == '1':
              s = s[:1] + '1' + s[2:]
          elif s[0] == '0':
              s = s[:1] + '9' + s[2:]
          else:
              s = s[:1] + '1' + s[2:]
      if s[3] == '?':
          s = s[:3] + '5' + s[4:]
      if s[4] == '?':
          s = s[:4] + '9'
      return s