code: def date_parse(s):
      
      s = as_str(s)
      if s.endswith(' BC'):
          raise errors.NotSupportedError('Dates Before Christ are not supported. Got: {0}'.format(s))
  
      # Value error, year might be over 9999
      return date(*map(lambda x: min(int(x), 9999), s.split('-')))
docs: Parses value of a DATE type.
      :param s: string to parse into date
      :return: an instance of datetime.date
      :raises NotSupportedError when a date Before Christ is encountered