code: def get_transform(is_train, args):
      if is_train:
          return presets.DetectionPresetTrain(
              data_augmentation=args.data_augmentation,
              backend=args.backend,
              use_v2=args.use_v2,
          )
      elif args.weights and args.test_only:
          weights = torchvision.models.get_weight(args.weights)
          trans = weights.transforms()
          return lambda img, target: (trans(img), target)
      else:
          return presets.DetectionPresetEval(
              backend=args.backend, use_v2=args.use_v2
          )
  
file_path: vision/references/detection/train.py
imports: import datetime
  import os
  import time
  import presets
  import torch
  import torch.utils.data
  import torchvision
  import torchvision.models.detection
  import torchvision.models.detection.mask_rcnn
  import utils
  from coco_utils import get_coco
  from engine import evaluate, train_one_epoch
  from group_by_aspect_ratio import create_aspect_ratio_groups, GroupedBatchSampler
  from torchvision.transforms import InterpolationMode
  from transforms import SimpleCopyPaste
label_desc: Use image node_id 3 for calling a global function with example usage: get_transform(is_train, args) and returns: presets, function, presets