code: def _add_image(ax, image):
      """Add the image to the given `matplotlib.axes.Axes`."""
      plt = lazy_imports_lib.lazy_imports.matplotlib.pyplot
  
      if len(image.shape) != 3:
          raise ValueError(
              "Image dimension should be 3. tfds.show_examples does not support "
              "batched examples or video."
          )
      _, _, c = image.shape
      if c == 1:
          image = image.reshape(image.shape[:2])
      ax.imshow(image, cmap="gray")
      ax.grid(False)
      plt.xticks([], [])
      plt.yticks([], [])
  
file_path: datasets/tensorflow_datasets/core/visualization/image_visualizer.py
imports: from __future__ import annotations
  from typing import Optional
  from absl import logging
  from tensorflow_datasets.core import dataset_info
  from tensorflow_datasets.core import dataset_utils
  from tensorflow_datasets.core import features
  from tensorflow_datasets.core import lazy_imports_lib
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  from tensorflow_datasets.core.visualization import visualizer
label_desc: Use image node_id 2 for calling a global function with example usage: _add_image(ax, image) without return types