code: def generate_image_df(args, dataset):
      column_names = args.column_names + [args.label_column]
      dataset_df = pd.DataFrame(columns=column_names)
      for data in dataset:
          per_df = pd.DataFrame(
              [[data.impath, data.label]], columns=column_names
          )
          dataset_df = pd.concat(
              [dataset_df, per_df],
              ignore_index=True,
          )
      return dataset_df
  
imports: import torch
  import pandas
  from tqdm import tqdm
  import torch.nn.functional
  import torch.nn
  from autogluon.multimodal import MultiModalPredictor
  from datasets import list_datasets, load_dataset
  from setfit import sample_dataset
  from imagedatasets import build_dataset
  from torch.utils.data import Dataset
label_desc: Use image node_id 2 for calling a global function with example usage: generate_image_df(args, dataset) and returns: dataset_df