code: def update_registry_for_model(self, config):
      if hasattr(self.dataset, "text_processor"):
          registry.register(
              self.dataset_name + "_text_vocab_size",
              self.dataset.text_processor.get_vocab_size(),
          )
      if hasattr(self.dataset, "answer_processor"):
          registry.register(
              self.dataset_name + "_num_final_outputs",
              self.dataset.answer_processor.get_vocab_size(),
          )
  
file_path: mmf/mmf/datasets/builders/vqa2/builder.py
imports: from mmf.common.registry import registry
  from mmf.datasets.builders.vqa2.dataset import VQA2Dataset
  from mmf.datasets.mmf_dataset_builder import MMFDatasetBuilder
label_desc: Use image node_id 4 for calling the VQA2Builder obj's underlying member method code with example usage: obj.update_registry_for_model(config) without return types