code: def remove_batch_dim_fn(loader):
      def warpper_fn(batch):
          data = default_collate(batch)
  
          def recusive_remove(data):
              if isinstance(data, torch.Tensor):
                  return data.squeeze(0)
              elif isinstance(data, list) or isinstance(data, tuple):
                  return tuple([recusive_remove(x) for x in data])
              elif isinstance(data, dict):
                  for key in data:
                      data[key] = data[key].squeeze(0)
                  return data
  
          return recusive_remove(data)
  
      loader.collate_fn = warpper_fn
      return loader
  
file_path: BigDL/python/nano/src/bigdl/nano/utils/pytorch/dataset.py
imports: import torch
  from torch.utils.data import Dataset
  from torch.utils.data.dataloader import default_collate
label_desc: Use image node_id 1 for calling a global function with example usage: remove_batch_dim_fn(loader) and returns: loader, recusive_remove, data, tuple, data