<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def describe_field(k, v, timestamp_parser=default_timestamp_parser):
 """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 -------- {"name": "username", "type": "string", "mode": "nullable"} {"name": "users", "type": "record", "mode": "repeated", "fields": [{"name":"username","type":"string","mode":"nullable"}]} """


    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