class_docstr: An abstract class representing a Dataset.
  
  All other datasets should subclass it. All subclasses should override
  ``__len__``, that provides the size of the dataset, and ``__getitem__``,
  supporting integer indexing in range from 0 to len(self) exclusive.
class_docstr_tok: ["An","abstract","class","representing","a","Dataset",".","All","other","datasets","should","subclass","it",".","All","subclasses","should","override","``","__len__","``",",","that","provides","the","size","of","the","dataset",",","and","``","__getitem__","``",",","supporting","integer","indexing","in","range","from","0","to","len","(","self",")","exclusive","."]
code: def add_input_transform(self, transform, add_to_front=True, idx=None):
      if idx is None:
          idx = np.arange(len(self.num_inputs))
      elif not is_tuple_or_list(idx):
          idx = [idx]
  
      if add_to_front:
          for i in idx:
              self.input_transform[i] = transforms.Compose(
                  [transform, self.input_transform[i]]
              )
      else:
          for i in idx:
              self.input_transform[i] = transforms.Compose(
                  [self.input_transform[i], transform]
              )
  
file_path: pywick/pywick/datasets/BaseDataset.py
imports: import numpy
  import torch
  from torchvision import transforms
  from .data_utils import is_tuple_or_list
label_desc: Use image node_id 2 for calling the BaseDataset obj's underlying member method code with example usage: obj.add_input_transform(transform, add_to_front, idx) without return types