code: def make_multiscale_dilated(image, resolutions, num_channels=3):
      """Returns list of scaled images, one for each resolution.
  
      Resizes by skipping every nth pixel.
  
      Args:
        image: Tensor of shape [height, height, num_channels].
        resolutions: List of heights that image's height is resized to. The function
          assumes VALID padding, so the original image's height must be divisible
          by each resolution's height to return the exact resolution size.
        num_channels: Number of channels in image.
  
      Returns:
        List of Tensors, one for each resolution with shape given by
        [resolutions[i], resolutions[i], num_channels] if resolutions properly
        divide the original image's height; otherwise shape height and width is up
        to valid skips.
      """
      image_height = common_layers.shape_list(image)[0]
      scaled_images = []
      for height in resolutions:
          dilation_rate = (
              image_height // height
          )  # assuming height = width
          scaled_image = image[::dilation_rate, ::dilation_rate]
          scaled_image = tf.to_int64(scaled_image)
          scaled_image.set_shape([None, None, num_channels])
          scaled_images.append(scaled_image)
      return scaled_images
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import io
  import os
  import numpy
  from tensor2tensor.data_generators import generator_utils
  from tensor2tensor.data_generators import problem
  from tensor2tensor.data_generators import text_encoder
  from tensor2tensor.layers import common_layers
  from tensor2tensor.layers import modalities
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import metrics
  import tensorflow.compat.v1
label_desc: Use image node_id 6 for calling a global function with example usage: make_multiscale_dilated(image, resolutions, num_channels) and returns: scaled_images