code: def get_feat_sizes(
      image_size: Union[Text, int, Tuple[int, int]], max_level: int
  ):
      """Get feat widths and heights for all levels.
  
      Args:
        image_size: A integer, a tuple (H, W), or a string with HxW format.
        max_level: maximum feature level.
  
      Returns:
        feat_sizes: a list of tuples (height, width) for each level.
      """
      image_size = parse_image_size(image_size)
      feat_sizes = [{"height": image_size[0], "width": image_size[1]}]
      feat_size = image_size
      for _ in range(1, max_level + 1):
          feat_size = (
              (feat_size[0] - 1) // 2 + 1,
              (feat_size[1] - 1) // 2 + 1,
          )
          feat_sizes.append(
              {"height": feat_size[0], "width": feat_size[1]}
          )
      return feat_sizes
  
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 10 for calling a global function with example usage: get_feat_sizes(image_size, max_level) and returns: feat_sizes