docs: def parse(text):
      '''Parse a geoid from text and return a tuple (level, code, validity)'''
      if '@' in text:
          spatial, validity = text.split('@')
      else:
          spatial = text
          validity = 'latest'
      if ':' not in spatial:
          raise GeoIDError('Bad GeoID format: {0}'.format(text))
      # country-subset is a special case:
      if spatial.startswith('country-subset:'):
          level, code = spatial.split(':', 1)
      else:
          level, code = spatial.rsplit(':', 1)
      return level, code, validity