code: def _get_rescaled_size(scale, h, w):
      if h < w:
          new_h = scale
          new_w = int(scale * w / h)
      else:
          new_w = scale
          new_h = int(scale * h / w)
      return new_h, new_w
  
imports: import random
  from typing import Any, Callable, Dict, List, Optional, Union
  import torch
  import torchvision.transforms
  import torchvision.transforms._transforms_video
  from .None import build_transforms, ClassyTransform, register_transform
  from .util import ApplyTransformToKey, ImagenetConstants, TupleToMapTransform
label_desc: Use image node_id 1 for calling a global function with example usage: _get_rescaled_size(scale, h, w) and returns: new_h,  new_w