code: def parse_elements(elements):
          
          if not len(elements) in (6, 7):
              raise ValueError('Invalid GLL position data')
          # Latitude and longitude are checked for validity during Fix
          # instantiation
          latitude = parse_latitude(elements[0], elements[1])
          longitude = parse_longitude(elements[2], elements[3])
          hour, minute, second = [int(elements[4][i:i + 2])
                                  for i in range(0, 6, 2)]
          usecond = int(elements[4][6:8]) * 10000
          time = datetime.time(hour, minute, second, usecond)
          active = True if elements[5] == 'A' else False
          mode = elements[6] if len(elements) == 7 else None
          return LoranPosition(latitude, longitude, time, active, mode)
docs: Parse position data elements.
  
          Args:
              elements (list): Data values for fix
  
          Returns:
              Fix: Fix object representing data