code: def onpick4(event):
      artist = event.artist
      if isinstance(artist, AxesImage):
          im = artist
          A = im.get_array()
          print("onpick4 image", A.shape)
  
file_path: matplotlib/galleries/examples/event_handling/pick_event_demo.py
imports: import matplotlib.pyplot
  import numpy
  from numpy.random import rand
  from matplotlib.image import AxesImage
  from matplotlib.lines import Line2D
  from matplotlib.patches import Rectangle
  from matplotlib.text import Text
label_desc: Use image node_id 5 for calling a global function with example usage: onpick4(event) without return types