code: def build_augmentation_ranged_clip(cfg, is_train):
      """
      With option to don't use hflip
  
      Returns:
          list[Augmentation]
      """
      if is_train:
          if cfg.CONFIG.DATA.DETECTION.MIN_SIZE_RANGE_TRAIN[0] == -1:
              min_size = cfg.CONFIG.DATA.DETECTION.MIN_SIZE_TRAIN
          else:
              assert (
                  len(cfg.CONFIG.DATA.DETECTION.MIN_SIZE_RANGE_TRAIN)
                  == 2
              ), "MIN_SIZE_RANGE_TRAIN must have two elements (lower bound, upper bound)"
              min_size = range(
                  cfg.CONFIG.DATA.DETECTION.MIN_SIZE_RANGE_TRAIN[0],
                  cfg.CONFIG.DATA.DETECTION.MIN_SIZE_RANGE_TRAIN[1] + 1,
              )
          max_size = cfg.CONFIG.DATA.DETECTION.MAX_SIZE_TRAIN
          sample_style = (
              cfg.CONFIG.DATA.DETECTION.MIN_SIZE_TRAIN_SAMPLING
          )
      else:
          min_size = cfg.CONFIG.DATA.DETECTION.MIN_SIZE_TEST
          max_size = cfg.CONFIG.DATA.DETECTION.MAX_SIZE_TEST
          sample_style = "choice"
      if sample_style == "range":
          assert (
              len(min_size) == 2
          ), "more than 2 ({}) min_size(s) are provided for ranges".format(
              len(min_size)
          )
  
      logger = logging.getLogger(__name__)
  
      augmentation = []
      augmentation.append(
          T.ResizeShortestEdge(min_size, max_size, sample_style)
      )
      if is_train:
          if cfg.CONFIG.DATA.DETECTION.HFLIP_TRAIN:
              augmentation.append(T.RandomFlip())
          logger.info(
              "Augmentations used in training: " + str(augmentation)
          )
      return augmentation
  
imports: import os
  import logging
  import numpy
  from PIL import Image
  import torch
  from ..structures import BitMasks, Boxes, BoxMode, Instances, Keypoints, PolygonMasks, polygons_to_bitmask
  from ..transforms import instance_transforms
  from ..registry.catalog import MetadataCatalog
label_desc: Use image node_id 19 for calling a global function with example usage: build_augmentation_ranged_clip(cfg, is_train) and returns: augmentation