code: def get_image_size(
      image: np.ndarray, channel_dim: ChannelDimension = None
  ) -> Tuple[int, int]:
      """
      Returns the (height, width) dimensions of the image.
  
      Args:
          image (`np.ndarray`):
              The image to get the dimensions of.
          channel_dim (`ChannelDimension`, *optional*):
              Which dimension the channel dimension is in. If `None`, will infer the channel dimension from the image.
  
      Returns:
          A tuple of the image's height and width.
      """
      if channel_dim is None:
          channel_dim = infer_channel_dimension_format(image)
  
      if channel_dim == ChannelDimension.FIRST:
          return image.shape[-2], image.shape[-1]
      elif channel_dim == ChannelDimension.LAST:
          return image.shape[-3], image.shape[-2]
      else:
          raise ValueError(f"Unsupported data format: {channel_dim}")
  
imports: import os
  from typing import TYPE_CHECKING, List, Tuple, Union
  import numpy
  from packaging import version
  import requests
  from .utils import ExplicitEnum, is_jax_tensor, is_tf_tensor, is_torch_available, is_torch_tensor, is_vision_available, to_numpy
  from .utils.constants import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD, IMAGENET_STANDARD_MEAN, IMAGENET_STANDARD_STD
label_desc: Use image node_id 7 for calling a global function with example usage: get_image_size(image, channel_dim) and returns: image,  image, image,  image