code: def parse_image_size(image_size: Union[Text, int, Tuple[int, int]]):
      """Parse the image size and return (height, width).
  
      Args:
        image_size: A integer, a tuple (H, W), or a string with HxW format.
  
      Returns:
        A tuple of integer (height, width).
      """
      if isinstance(image_size, int):
          # image_size is integer, with the same width and height.
          return (image_size, image_size)
  
      if isinstance(image_size, str):
          # image_size is a string with format WxH
          width, height = image_size.lower().split("x")
          return (int(height), int(width))
  
      if isinstance(image_size, tuple):
          return image_size
  
      raise ValueError(
          "image_size must be an int, WxH string, or (height, width)"
          "tuple. Was %r" % image_size
      )
  
imports: from typing import Text, Tuple, Union
  import tensorflow
  import argparse
  import tensorflow.compat.v1
  from enum import Enum
  from collections import namedtuple
  from tensorflow.python.eager import tape
  from tensorflow.python.tpu import tpu_function
label_desc: Use image node_id 9 for calling a global function with example usage: parse_image_size(image_size) and returns: image_size,  image_size, int,  int, image_size