code: def __init__(
      self,
      data,
      patch_size,
      final_patch_size,
      batch_size,
      oversample_foreground_percent=0.0,
      memmap_mode="r",
      pseudo_3d_slices=1,
      pad_mode="edge",
      pad_kwargs_data=None,
      pad_sides=None,
  ):
      super(DataLoader2D, self).__init__(data, batch_size, None)
      if pad_kwargs_data is None:
          pad_kwargs_data = OrderedDict()
      self.pad_kwargs_data = pad_kwargs_data
      self.pad_mode = pad_mode
      self.pseudo_3d_slices = pseudo_3d_slices
      self.oversample_foreground_percent = oversample_foreground_percent
      self.final_patch_size = final_patch_size
      self.patch_size = patch_size
      self.list_of_keys = list(self._data.keys())
      self.need_to_pad = np.array(patch_size) - np.array(
          final_patch_size
      )
      self.memmap_mode = memmap_mode
      if pad_sides is not None:
          if not isinstance(pad_sides, np.ndarray):
              pad_sides = np.array(pad_sides)
          self.need_to_pad += pad_sides
      self.pad_sides = pad_sides
      self.data_shape, self.seg_shape = self.determine_shapes()
  
imports: import os
  import pickle
  import numpy
  from collections import OrderedDict
  from abc import abstractmethod
label_desc: Use image node_id 1 to create a new DataLoader2D object from inherited base classes: SlimDataLoaderBase with example: obj = DataLoader2D(data, patch_size, final_patch_size, batch_size, oversample_foreground_percent, memmap_mode, pseudo_3d_slices, pad_mode, pad_kwargs_data, pad_sides)