code: def resize(
      image,
      size,
      method="bilinear",
      preserve_aspect_ratio=False,
      antialias=False,
  ):
      unsqueezed = False
      if len(image.shape) == 3:
          image = image.unsqueeze(0)
          unsqueezed = True
      if preserve_aspect_ratio:
          height, width = image.shape[2:]
          new_height, new_width = size
          aspect_ratio = width / height
          new_aspect_ratio = new_width / new_height
          if new_aspect_ratio > aspect_ratio:
              new_width = int(new_height * aspect_ratio)
              new_height = int(new_width * aspect_ratio)
          else:
              new_width = int(new_height / aspect_ratio)
              new_height = int(new_width / aspect_ratio)
      else:
          new_height, new_width = size
      if method == "bicubic":
          method = "tf_bicubic"
      elif method == "area":
          method = "tf_area"
      image = ivy.interpolate(
          image,
          (new_height, new_width),
          mode=method,
          align_corners=False,
          antialias=antialias,
      )
      if unsqueezed:
          return image.squeeze(0)
      return image
  
imports: import functools
  import ivy
  from ivy.functional.frontends.tensorflow.func_wrapper import to_ivy_arrays_and_back
  from ivy.func_wrapper import with_supported_dtypes
label_desc: Use image node_id 2 for calling a global function with example usage: resize(image, size, method, preserve_aspect_ratio, antialias) and returns: image, image