code: def from_csv(input_csv, headers=None, schema_file=None):
      
  
      if headers is not None:
        names = headers
      elif schema_file is not None:
        with _util.open_local_or_gcs(schema_file, mode='r') as f:
          schema = json.load(f)
        names = [x['name'] for x in schema]
      else:
        raise ValueError('Either headers or schema_file is needed')
  
      all_files = _util.glob_files(input_csv)
      all_df = []
      for file_name in all_files:
        with _util.open_local_or_gcs(file_name, mode='r') as f:
          all_df.append(pd.read_csv(f, names=names))
      df = pd.concat(all_df, ignore_index=True)
  
      if 'target' not in df or 'predicted' not in df:
        raise ValueError('Cannot find "target" or "predicted" column')
  
      labels = sorted(set(df['target']) | set(df['predicted']))
      cm = confusion_matrix(df['target'], df['predicted'], labels=labels)
      return ConfusionMatrix(cm, labels)
docs: Create a ConfusionMatrix from a csv file.
  
      Args:
        input_csv: Path to a Csv file (with no header). Can be local or GCS path.
        headers: Csv headers. If present, it must include 'target' and 'predicted'.
        schema_file: Path to a JSON file containing BigQuery schema. Used if "headers" is None.
            If present, it must include 'target' and 'predicted' columns.
      Returns:
        A ConfusionMatrix that can be plotted.
      Raises:
        ValueError if both headers and schema_file are None, or it does not include 'target'
            or 'predicted' columns.