code: def describe_field(k, v, timestamp_parser=default_timestamp_parser):
      
  
      def bq_schema_field(name, bq_type, mode):
          return {"name": name, "type": bq_type, "mode": mode}
  
      if isinstance(v, list):
          if len(v) == 0:
              raise Exception(
                  "Can't describe schema because of empty list {0}:[]".format(k))
          v = v[0]
          mode = "repeated"
      else:
          mode = "nullable"
  
      bq_type = bigquery_type(v, timestamp_parser=timestamp_parser)
      if not bq_type:
          raise InvalidTypeException(k, v)
  
      field = bq_schema_field(k, bq_type, mode)
      if bq_type == "record":
          try:
              field['fields'] = schema_from_record(v, timestamp_parser)
          except InvalidTypeException as e:
              # recursively construct the key causing the error
              raise InvalidTypeException("%s.%s" % (k, e.key), e.value)
  
      return field
docs: Given a key representing a column name and value representing the value
      stored in the column, return a representation of the BigQuery schema
      element describing that field. Raise errors if invalid value types are
      provided.
  
      Parameters
      ----------
      k : Union[str, unicode]
          Key representing the column
      v : Union[str, unicode, int, float, datetime, object]
          Value mapped to by `k`
  
      Returns
      -------
      object
          Describing the field
  
      Raises
      ------
      Exception
          If invalid value types are provided.
  
      Examples
      --------
      >>> describe_field("username", "Bob")
      {"name": "username", "type": "string", "mode": "nullable"}
      >>> describe_field("users", [{"username": "Bob"}])
      {"name": "users", "type": "record", "mode": "repeated",
       "fields": [{"name":"username","type":"string","mode":"nullable"}]}