class_docstr: Finetune RETRO Model 
code: def build_train_valid_test_datasets(self):
      logging.info("Building RETRO datasets.")
      global_batch_size = (
          self.trainer.world_size
          * self.cfg.micro_batch_size
          // self.cfg.tensor_model_parallel_size
      )
      # Compute trianing micro-batch steps: total_global_batch_steps x grad_acumms_per_global_batch
      max_train_steps = (
          self.trainer.max_steps * self.trainer.accumulate_grad_batches
      )
      eval_iters = (
          max_train_steps // self.trainer.val_check_interval + 1
      ) * self.trainer.limit_val_batches
      test_iters = int(self.trainer.limit_test_batches)
  
      train_valid_test_num_samples = [
          max_train_steps * global_batch_size,
          eval_iters * global_batch_size,
          test_iters * global_batch_size,
      ]
  
      (
          self._train_ds,
          self._validation_ds,
          self._test_ds,
      ) = build_all_datasets(
          cfg=self.cfg.data,
          tokenizer=self.tokenizer,
          train_valid_test_num_samples=train_valid_test_num_samples,
      )
      if self._train_ds is not None:
          logging.info(
              f"Length of train dataset: {len(self._train_ds)}"
          )
      if self._validation_ds is not None:
          logging.info(
              f"Length of val dataset: {len(self._validation_ds)}"
          )
      if self._test_ds is not None:
          logging.info(f"Length of test dataset: {len(self._test_ds)}")
      logging.info(f"Finished building RETRO datasets.")
      return self._train_ds, self._validation_ds, self._test_ds
  
imports: import json
  from functools import partial
  import torch
  from omegaconf import DictConfig, ListConfig
  from pytorch_lightning.trainer.trainer import Trainer
  from nemo.collections.common.data import ConcatMapDataset
  from nemo.collections.common.metrics import MetricStringToTorchMetric
  from nemo.collections.common.metrics.classification_accuracy import ExactStringPerCategoryMatchMetric
  from nemo.collections.nlp.data.common.sequence_to_sequence_dataset import SequenceToSequenceDataset
  from nemo.collections.nlp.data.language_modeling.megatron.base_dataset_utils import get_datasets_weights_and_num_samples, get_train_valid_test_split_
  from nemo.collections.nlp.data.language_modeling.megatron.blendable_dataset import BlendableDataset
  from nemo.collections.nlp.data.language_modeling.megatron.megatron_batch_samplers import MegatronPretrainingBatchSampler
  from nemo.collections.nlp.data.language_modeling.megatron.retro_fine_tune_dataset import RetroQAFineTuneDataset
  from nemo.collections.nlp.models.language_modeling.megatron_retrieval_model import MegatronRetrievalModel
  from nemo.collections.nlp.models.language_modeling.megatron_t5_model import MegatronT5Model, T5Sentinel
  from nemo.collections.nlp.parts.nlp_overrides import GlobalBatchDataFetcher
  from nemo.utils import AppState, logging
label_desc: Use image node_id 1 for calling the MegatronRetroFinetuneModel obj's underlying member method code with example usage: obj.build_train_valid_test_datasets() and returns: self,  self,  self