code: def build_augmentation(cfg, is_train):
      """
      Create a list of default :class:`Augmentation` from config.
      Now it includes resizing and flipping.
  
      Returns:
          list[Augmentation]
      """
      if is_train:
          min_size = cfg.CONFIG.DATA.DETECTION.MIN_SIZE_TRAIN
          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)
          )
  
      augmentation = []
      augmentation.append(
          T.ResizeShortestEdge(min_size, max_size, sample_style)
      )
      if is_train:
          augmentation.append(T.RandomFlip())
      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 18 for calling a global function with example usage: build_augmentation(cfg, is_train) and returns: augmentation