code: def convert_hhmmss(hhmmss):
      
      fields = hhmmss.split(":")
      if len(fields) != 3:
          raise ValueError("Received invalid HH:MM:SS data: {}".format(hhmmss))
      fields = [int(x) for x in fields]
      hours, minutes, seconds = fields
      return (hours * 3600) + (minutes * 60) + seconds
docs: Convert hh:mm:ss to seconds.