code: def show_img(img, ax=None, show: bool = False, **kwargs):
      img = img.squeeze().copy()
      cmap = "gray" if len(img.shape) == 2 else None
  
      if ax is None:
          fig, ax = plt.subplots(**kwargs)
  
      ax.imshow(img, cmap=cmap)
      ax.set_axis_off()
  
      if show:
          plt.show()
  
      return ax
  
file_path: icevision/icevision/utils/imageio.py
imports: from icevision.imports import *
  from PIL import ExifTags
label_desc: Use image node_id 8 for calling a global function with example usage: show_img(img, ax, show) and returns: ax