class_docstr: T5 Finetuning model in the same format as MegatronGPTSFTModel 
class_docstr_tok: ["T5","Finetuning","model","in","the","same","format","as","MegatronGPTSFTModel"]
docstr: Buld dataloader given an input dataset.
docstr_tok: ["Buld","dataloader","given","an","input","dataset","."]
code: def build_data_loader(
      self,
      dataset,
      global_batch_size,
      shuffle,
      num_workers,
      pin_memory,
      drop_last,
  ):
      """Buld dataloader given an input dataset."""
  
      if dataset is None:
          return None
  
      rank = parallel_state.get_data_parallel_rank()
      world_size = parallel_state.get_data_parallel_world_size()
      sampler = torch.utils.data.distributed.DistributedSampler(
          dataset, num_replicas=world_size, rank=rank, shuffle=shuffle
      )
      if isinstance(dataset, ConcatMapDataset):
          collate_fn = dataset.datasets[0].collate_fn
      else:
          collate_fn = dataset.collate_fn
      # Data loader. Note that batch size is the per GPU batch size.
      return torch.utils.data.DataLoader(
          dataset,
          collate_fn=collate_fn,
          sampler=sampler,
          batch_size=global_batch_size
          // parallel_state.get_data_parallel_world_size(),
          num_workers=num_workers,
          pin_memory=pin_memory,
          drop_last=drop_last,
      )
  
imports: import itertools
  import json
  from typing import Dict, List
  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.t5_sft_dataset import T5SFTDataset
  from nemo.collections.nlp.models.language_modeling.megatron_t5_model import MegatronT5Model, T5Sentinel
  from nemo.collections.nlp.modules.common.megatron.utils import get_iterator_k_split
  from nemo.collections.nlp.parts.mixins.nlp_adapter_mixins import NLPAdapterModelMixin
  from nemo.collections.nlp.parts.utils_funcs import get_last_rank
  from nemo.utils import AppState, logging
label_desc: Use image node_id 21 for calling the MegatronT5SFTModel obj's underlying member method code with example usage: obj.build_data_loader(dataset, global_batch_size, shuffle, num_workers, pin_memory, drop_last) and returns: torch, None