code: def _parse_and_verify_image_size(
      image_size: Union[Tuple[int, int], int],
  ) -> Tuple[int, int]:
      """
      Parse image_size as a tuple of ints. Throw ValueError if the size is incompatible
      with the maximum renderable size as set in global_device_context_store.
      """
      height, width = parse_image_size(image_size)
      max_h = global_device_context_store.max_egl_height
      max_w = global_device_context_store.max_egl_width
      if height > max_h or width > max_w:
          raise ValueError(
              f"Max rasterization size is height={max_h}, width={max_w}. "
              f"Cannot raster an image of size {height}, {width}. You can change max "
              "allowed rasterization size by modifying the MAX_EGL_HEIGHT and "
              "MAX_EGL_WIDTH environment variables."
          )
      return height, width
  
imports: import warnings
  from typing import Optional, Tuple, Union
  import numpy
  import OpenGL.GL
  import pycuda.gl
  import torch
  import torch.nn
  from pytorch3d.structures.meshes import Meshes
  from ..cameras import FoVOrthographicCameras, FoVPerspectiveCameras
  from ..mesh.rasterizer import Fragments, RasterizationSettings
  from ..utils import parse_image_size
  from .opengl_utils import _torch_to_opengl, global_device_context_store
label_desc: Use image node_id 1 for calling a global function with example usage: _parse_and_verify_image_size(image_size) and returns: height,  width