class_docstr: Dataset for CLEVR. CLEVR is a reasoning task where given an image with some
  3D shapes you have to answer basic questions.
  
  Args:
      dataset_type (str): type of dataset, train|val|test
      config (DictConfig): Configuration Node representing all of the data necessary
                           to initialize CLEVR dataset class
      data_folder: Root folder in which all of the data will be present if passed
                   replaces default based on data_dir and data_folder in config.
class_docstr_tok: ["Dataset","for","CLEVR",".","CLEVR","is","a","reasoning","task","where","given","an","image","with","some","3D","shapes","you","have","to","answer","basic","questions",".","Args",":","dataset_type","(","str",")",":","type","of","dataset",",","train|val|test","config","(","DictConfig",")",":","Configuration","Node","representing","all","of","the","data","necessary","to","initialize","CLEVR","dataset","class","data_folder",":","Root","folder","in","which","all","of","the","data","will","be","present","if","passed","replaces","default","based","on","data_dir","and","data_folder","in","config","."]
code: def load(self):
      self.image_path = os.path.join(
          self._data_folder,
          _CONSTANTS["images_folder"],
          self._dataset_type,
      )
  
      with open(
          os.path.join(
              self._data_folder,
              _CONSTANTS["questions_folder"],
              _TEMPLATES["question_json_file"].format(
                  self._dataset_type
              ),
          )
      ) as f:
          self.questions = json.load(f)[_CONSTANTS["questions_key"]]
  
          # Vocab should only be built in main process, as it will repetition of same task
          if is_main():
              self._build_vocab(
                  self.questions, _CONSTANTS["question_key"]
              )
              self._build_vocab(
                  self.questions, _CONSTANTS["answer_key"]
              )
          synchronize()
  
file_path: mmf/mmf/datasets/builders/clevr/dataset.py
imports: import json
  import os
  import numpy
  import torch
  from mmf.common.sample import Sample
  from mmf.datasets.base_dataset import BaseDataset
  from mmf.utils.distributed import is_main, synchronize
  from mmf.utils.general import get_mmf_root
  from mmf.utils.text import tokenize, VocabFromText
  from PIL import Image
label_desc: Use image node_id 2 for calling the CLEVRDataset obj's underlying member method code with example usage: obj.load() without return types