code: def get_dataloader(
      self, type_path: str, batch_size: int, shuffle: bool = False
  ) -> DataLoader:
      dataset = self.get_dataset(type_path)
  
      if (
          self.hparams.sortish_sampler
          and type_path != "test"
          and type_path != "val"
      ):
          sampler = dataset.make_sortish_sampler(
              batch_size, distributed=self.hparams.gpus > 1
          )
          return DataLoader(
              dataset,
              batch_size=batch_size,
              collate_fn=dataset.collate_fn,
              shuffle=False,
              num_workers=self.num_workers,
              sampler=sampler,
          )
  
      elif (
          self.hparams.max_tokens_per_batch is not None
          and type_path != "test"
          and type_path != "val"
      ):
          batch_sampler = dataset.make_dynamic_sampler(
              self.hparams.max_tokens_per_batch,
              distributed=self.hparams.gpus > 1,
          )
          return DataLoader(
              dataset,
              batch_sampler=batch_sampler,
              collate_fn=dataset.collate_fn,
              # shuffle=False,
              num_workers=self.num_workers,
              # batch_size=None,
          )
      else:
          return DataLoader(
              dataset,
              batch_size=batch_size,
              collate_fn=dataset.collate_fn,
              shuffle=shuffle,
              num_workers=self.num_workers,
              sampler=None,
          )
  
imports: import argparse
  import glob
  import logging
  import os
  import sys
  import time
  from collections import defaultdict
  from pathlib import Path
  from typing import Dict, List, Tuple
  import numpy
  import pytorch_lightning
  import torch
  from torch import nn
  from torch.utils.data import DataLoader
  from callbacks import Seq2SeqLoggingCallback, get_checkpoint_callback, get_early_stopping_callback
  from transformers import MBartTokenizer, T5ForConditionalGeneration
  from transformers.models.bart.modeling_bart import shift_tokens_right
  from utils import ROUGE_KEYS, LegacySeq2SeqDataset, Seq2SeqDataset, assert_all_frozen, calculate_bleu, calculate_rouge, check_output_dir, flatten_list, freeze_embeds, freeze_params, get_git_info, label_smoothed_nll_loss, lmap, pickle_save, save_git_info, save_json, use_task_specific_params
  from lightning_base import BaseTransformer, add_generic_args, generic_train
label_desc: Use image node_id 15 for calling the SummarizationModule obj's underlying member method code with example usage: obj.get_dataloader(type_path, batch_size, shuffle) and returns: DataLoader, DataLoader, DataLoader