code: def apply_augmentations(
      augmentations: List[Union[Transform, Augmentation]], inputs
  ):
      """
      Use ``T.AugmentationList(augmentations)(inputs)`` instead.
      """
      if isinstance(inputs, np.ndarray):
          # handle the common case of image-only Augmentation, also for backward compatibility
          image_only = True
          inputs = AugInput(inputs)
      else:
          image_only = False
      tfms = inputs.apply_augmentations(augmentations)
      return inputs.image if image_only else inputs, tfms
  
imports: import inspect
  import numpy
  import pprint
  from typing import Any, List, Optional, Tuple, Union
  from fvcore.transforms.transform import Transform, TransformList
label_desc: Use image node_id 4 for calling a global function with example usage: apply_augmentations(augmentations, inputs) and returns: unknown,  tfms