code: def _process_csv_argument(csv):
      if isinstance(csv, str):
          df = pd.read_csv(csv)
      elif isinstance(csv, pd.DataFrame):
          df = csv
      else:
          raise ValueError("csv argument must be string or dataframe")
      return df
  
file_path: pywick/pywick/datasets/CSVDataset.py
imports: from .BaseDataset import BaseDataset
  import numpy
  import pandas
  from .data_utils import _return_first_element_of_list, default_file_reader, _pass_through, _process_transform_argument, _process_co_transform_argument
label_desc: Use image node_id 2 for calling a global function with example usage: _process_csv_argument(csv) and returns: df