class_docstr: Base class for implementing a dataset. Inherits from PyTorch's Dataset class
  but adds some custom functionality on top. Processors mentioned in the
  configuration are automatically initialized for the end user.
  
  Args:
      dataset_name (str): Name of your dataset to be used a representative
          in text strings
      dataset_type (str): Type of your dataset. Normally, train|val|test
      config (DictConfig): Configuration for the current dataset
class_docstr_tok: ["Base","class","for","implementing","a","dataset",".","Inherits","from","PyTorch","'s","Dataset","class","but","adds","some","custom","functionality","on","top",".","Processors","mentioned","in","the","configuration","are","automatically","initialized","for","the","end","user",".","Args",":","dataset_name","(","str",")",":","Name","of","your","dataset","to","be","used","a","representative","in","text","strings","dataset_type","(","str",")",":","Type","of","your","dataset",".","Normally",",","train|val|test","config","(","DictConfig",")",":","Configuration","for","the","current","dataset"]
docstr: Can be possibly overridden in your child class. Not supported w Lightning
  trainer
  
  Prepare batch for passing to model. Whatever returned from here will
  be directly passed to model's forward function. Currently moves the batch to
  proper device.
  
  Args:
      batch (SampleList): sample list containing the currently loaded batch
  
  Returns:
      sample_list (SampleList): Returns a sample representing current
          batch loaded
docstr_tok: ["Can","be","possibly","overridden","in","your","child","class",".","Not","supported","w","Lightning","trainer","Prepare","batch","for","passing","to","model",".","Whatever","returned","from","here","will","be","directly","passed","to","model","'s","forward","function",".","Currently","moves","the","batch","to","proper","device",".","Args",":","batch","(","SampleList",")",":","sample","list","containing","the","currently","loaded","batch","Returns",":","sample_list","(","SampleList",")",":","Returns","a","sample","representing","current","batch","loaded"]
code: def prepare_batch(self, batch):
      """
      Can be possibly overridden in your child class. Not supported w Lightning
      trainer
  
      Prepare batch for passing to model. Whatever returned from here will
      be directly passed to model's forward function. Currently moves the batch to
      proper device.
  
      Args:
          batch (SampleList): sample list containing the currently loaded batch
  
      Returns:
          sample_list (SampleList): Returns a sample representing current
              batch loaded
      """
      # Should be a SampleList
      if not isinstance(batch, SampleList):
          # Try converting to SampleList
          batch = SampleList(batch)
      batch = batch.to(self._device)
      return batch
  
file_path: mmf/mmf/datasets/base_dataset.py
imports: from mmf.common.registry import registry
  from mmf.common.sample import SampleList
  from mmf.utils.general import get_current_device
  from torch.utils.data.dataset import Dataset
label_desc: Use image node_id 5 for calling the BaseDataset obj's underlying member method code with example usage: obj.prepare_batch(batch) and returns: batch