docs: def parsetime(s):
      """Internal function to parse the time parses time in HH:MM:SS.mmm format.
  
      Returns:
          a four-tuple ``(hours,minutes,seconds,milliseconds)``
      """
      try:
          fields = s.split('.')
          subfields = fields[0].split(':')
          H = int(subfields[0])
          M = int(subfields[1])
          S = int(subfields[2])
          if len(subfields) > 3:
              m = int(subfields[3])
          else:
              m = 0
          if len(fields) > 1:
              m = int(fields[1])
          return (H,M,S,m)
      except:
          raise ValueError("Invalid timestamp, must be in HH:MM:SS.mmm format: " + s)