code: def get_max_height_width(
      images: List[np.ndarray],
      input_data_format: Optional[Union[str, ChannelDimension]] = None,
  ) -> List[int]:
      """
      Get the maximum height and width across all images in a batch.
      """
      if input_data_format is None:
          input_data_format = infer_channel_dimension_format(images[0])
  
      if input_data_format == ChannelDimension.FIRST:
          _, max_height, max_width = max_across_indices(
              [img.shape for img in images]
          )
      elif input_data_format == ChannelDimension.LAST:
          max_height, max_width, _ = max_across_indices(
              [img.shape for img in images]
          )
      else:
          raise ValueError(
              f"Invalid channel dimension format: {input_data_format}"
          )
      return (max_height, max_width)
  
file_path: transformers/src/transformers/models/bridgetower/image_processing_bridgetower.py
imports: from typing import Any, Dict, Iterable, List, Optional, Tuple, Union
  import numpy
  from ...image_processing_utils import BaseImageProcessor, BatchFeature, get_size_dict
  from ...image_transforms import PaddingMode, center_crop, pad, resize, to_channel_dimension_format
  from ...image_utils import OPENAI_CLIP_MEAN, OPENAI_CLIP_STD, ChannelDimension, ImageInput, PILImageResampling, get_image_size, infer_channel_dimension_format, is_batched, is_scaled_image, to_numpy_array, valid_images
  from ...utils import TensorType, is_vision_available, logging
label_desc: Use image node_id 3 for calling a global function with example usage: get_max_height_width(images, input_data_format) and returns: max_height,  max_width