code: def get_size(
      image_size: List[int],
      size: Union[int, List[int]],
      max_size: Optional[int] = None,
  ):
      if isinstance(size, (list, tuple)):
          return size[::-1]
      else:
          return get_size_with_aspect_ratio(image_size, size, max_size)
  
imports: import random
  from typing import List, Optional, Union
  import torch
  import torchvision.transforms
  import torchvision.transforms.functional
  from mmf.common.registry import registry
  from mmf.datasets.processors.processors import BaseProcessor
  from mmf.utils.box_ops import box_xyxy_to_cxcywh
  from torch import Tensor
label_desc: Use image node_id 4 for calling a global function with example usage: get_size(image_size, size, max_size) and returns: size, get_size_with_aspect_ratio