code: def dreambooth_munge_data(params, local):
      # check if params.image_path is a directory
      if os.path.isdir(params.image_path):
          training_data = [
              os.path.join(params.image_path, f)
              for f in os.listdir(params.image_path)
          ]
          dset = AutoTrainDreamboothDataset(
              concept_images=training_data,
              concept_name=params.prompt,
              token=params.token,
              project_name=params.project_name,
              username=params.username,
              local=local,
          )
          params.image_path = dset.prepare()
      return params
  
file_path: autotrain-advanced/src/autotrain/cli/utils.py
imports: import os
  from autotrain.dataset import AutoTrainDataset, AutoTrainDreamboothDataset
label_desc: Use image node_id 7 for calling a global function with example usage: dreambooth_munge_data(params, local) and returns: params