class_docstr: DataHandler generate augmented batches used for training or validation.
  
  Args:
      lr_dir: directory containing the Low Res images.
      hr_dir: directory containing the High Res images.
      patch_size: integer, size of the patches extracted from LR images.
      scale: integer, upscaling factor.
      n_validation_samples: integer, size of the validation set. Only provided if the
          DataHandler is used to generate validation sets.
docstr: Rotates and flips input image according to transform_selection. 
docstr_tok: ["Rotates","and","flips","input","image","according","to","transform_selection","."]
code: def _apply_transform(self, img, transform_selection):
      """Rotates and flips input image according to transform_selection."""
  
      rotate = {
          0: lambda x: x,
          1: lambda x: np.rot90(x, k=1, axes=(1, 0)),  # rotate right
          2: lambda x: np.rot90(x, k=1, axes=(0, 1)),  # rotate left
      }
  
      flip = {
          0: lambda x: x,
          1: lambda x: np.flip(x, 0),  # flip along horizontal axis
          2: lambda x: np.flip(x, 1),  # flip along vertical axis
      }
  
      rot_direction = transform_selection[0]
      flip_axis = transform_selection[1]
  
      img = rotate[rot_direction](img)
      img = flip[flip_axis](img)
  
      return img
  
file_path: image-super-resolution/ISR/utils/datahandler.py
imports: import os
  import imageio
  import numpy
  from ISR.utils.logger import get_logger
label_desc: Use image node_id 7 for calling the DataHandler obj's underlying member method code with example usage: obj._apply_transform(img, transform_selection) and returns: img