code: def __init__(self, canvas):
      data_path = cbook._get_data_path("images")
      _, tooltips, image_names, _ = zip(*NavigationToolbar2.toolitems)
      _macosx.NavigationToolbar2.__init__(
          self,
          canvas,
          tuple(
              str(data_path / image_name) + ".pdf"
              for image_name in image_names
              if image_name is not None
          ),
          tuple(tooltip for tooltip in tooltips if tooltip is not None),
      )
      NavigationToolbar2.__init__(self, canvas)
  
imports: import os
  import matplotlib
  from matplotlib import _api, cbook
  from matplotlib._pylab_helpers import Gcf
  from .None import _macosx
  from .backend_agg import FigureCanvasAgg
  from matplotlib.backend_bases import _Backend, FigureCanvasBase, FigureManagerBase, NavigationToolbar2, ResizeEvent, TimerBase, _allow_interrupt
label_desc: Use image node_id 1 to create a new NavigationToolbar2Mac object from inherited base classes: _macosx, NavigationToolbar2 with example: obj = NavigationToolbar2Mac(canvas)