def _from_record(data):
    """
    Infer a BigQuery table schema from a list of fields or a dictionary. The typeof the elements
    is used. For a list, the field names are simply 'Column1', 'Column2', etc.

    Args:
      data: The list of fields or dictionary.
    Returns:
      A list of dictionaries containing field 'name' and 'type' entries, suitable for use in a
          BigQuery Tables resource schema.
    """
    if isinstance(data, dict):
      return Schema._from_dict_record(data)
    elif isinstance(data, list):
      return Schema._from_list_record(data)
    else:
      raise Exception('Cannot create a schema from record %s' % str(data))
Infer a BigQuery table schema from a list of fields or a dictionary. The typeof the elements
    is used. For a list, the field names are simply 'Column1', 'Column2', etc.

    Args:
      data: The list of fields or dictionary.
    Returns:
      A list of dictionaries containing field 'name' and 'type' entries, suitable for use in a
          BigQuery Tables resource schema.