code: def _get_handles(ax):
      handles = ax.lines[:]
      handles.extend(ax.patches)
      handles.extend(
          [
              c
              for c in ax.collections
              if isinstance(c, mcoll.LineCollection)
          ]
      )
      handles.extend(
          [
              c
              for c in ax.collections
              if isinstance(c, mcoll.RegularPolyCollection)
          ]
      )
      handles.extend(
          [
              c
              for c in ax.collections
              if isinstance(c, mcoll.CircleCollection)
          ]
      )
  
      return handles
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  from matplotlib import artist, collections, transforms, rcParams
  from matplotlib.axes import subplot_class_factory
  from matplotlib.transforms import Bbox
  from .mpl_axes import Axes
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: _get_handles(ax) and returns: handles