class_docstr: Class for loading data with batches 
class_docstr_tok: ["Class","for","loading","data","with","batches"]
code: def _load_to_meta_df(self, files, shuffle=True):
      data_rows = []
      for file in files:
          dir_name = os.path.basename(os.path.dirname(file))
          row = [file, dir_name]
          data_rows.append(row)
  
      self.meta_df = pd.DataFrame(
          data=data_rows, columns=["file_path", f"{self.target_name}"]
      )
      # shuffle samples
      if shuffle:
          self.meta_df = self.meta_df.sample(frac=1).reset_index(
              drop=True
          )
  
imports: import glob
  import json
  import os
  from abc import ABC, abstractmethod
  import pandas
label_desc: Use image node_id 4 for calling the BatchLoader obj's underlying member method code with example usage: obj._load_to_meta_df(files, shuffle) without return types