docs: def build(level, code, validity=None):
      '''Serialize a GeoID from its parts'''
      spatial = ':'.join((level, code))
      if not validity:
          return spatial
      elif isinstance(validity, basestring):
          return '@'.join((spatial, validity))
      elif isinstance(validity, datetime):
          return '@'.join((spatial, validity.date().isoformat()))
      elif isinstance(validity, date):
          return '@'.join((spatial, validity.isoformat()))
      else:
          msg = 'Unknown GeoID validity type: {0}'
          raise GeoIDError(msg.format(type(validity).__name__))