code: def lon_to_deg(lon):
      
      if isinstance(lon, str) and (':' in lon):
          # TODO: handle other coordinate systems
          lon_deg = hmsStrToDeg(lon)
      else:
          lon_deg = float(lon)
      return lon_deg
docs: Convert longitude to degrees.