code: def _prepare_image(attr_visual: ndarray):
      return np.clip(attr_visual.astype(int), 0, 255)
  
imports: import warnings
  from enum import Enum
  from typing import List, Optional, Tuple, Union
  import matplotlib
  import numpy
  from matplotlib import pyplot
  from matplotlib.colors import LinearSegmentedColormap
  from matplotlib.pyplot import Axes, Figure
  from mpl_toolkits.axes_grid1 import make_axes_locatable
  from numpy import ndarray
label_desc: Use image node_id 1 for calling a global function with example usage: _prepare_image(attr_visual) and returns: np