code: def display_arr(
      screen: Surface,
      arr: np.ndarray,
      video_size: Tuple[int, int],
      transpose: bool,
  ):
      """Displays a numpy array on screen.
  
      Args:
          screen: The screen to show the array on
          arr: The array to show
          video_size: The video size of the screen
          transpose: If to transpose the array on the screen
      """
      arr_min, arr_max = np.min(arr), np.max(arr)
      arr = 255.0 * (arr - arr_min) / (arr_max - arr_min)
      pyg_img = pygame.surfarray.make_surface(
          arr.swapaxes(0, 1) if transpose else arr
      )
      pyg_img = pygame.transform.scale(pyg_img, video_size)
      screen.blit(pyg_img, (0, 0))
  
file_path: gym/gym/utils/play.py
imports: from collections import deque
  from typing import Callable, Dict, List, Optional, Tuple, Union
  import numpy
  import gym.error
  from gym import Env, logger
  from gym.core import ActType, ObsType
  from gym.error import DependencyNotInstalled
  from gym.logger import deprecation
label_desc: Use image node_id 1 for calling a global function with example usage: display_arr(screen, arr, video_size, transpose) without return types