code: def _setup_wx(tb):
      import wx
  
      idx = next(
          idx
          for idx in range(tb.ToolsCount)
          if tb.GetToolByPos(idx).IsStretchableSpace()
      )
      tb.InsertSeparator(idx)
      tool = tb.InsertTool(
          idx + 1,
          -1,
          _BUTTON_NAME,
          # FIXME: _icon needs public API.
          tb._icon(str(Path(__file__).parent / "images/eye.png")),
          # FIXME: ITEM_DROPDOWN is not supported on macOS.
          kind=wx.ITEM_DROPDOWN,
          shortHelp=_BUTTON_HELP,
      )
  
      menu = wx.Menu()
      for name in _MENU_ENTRIES:
          item = menu.AppendRadioItem(-1, name)
          menu.Bind(
              wx.EVT_MENU,
              lambda event, _name=name: _set_menu_entry(tb, _name),
              id=item.Id,
          )
      tb.SetDropdownMenu(tool.Id, menu)
  
file_path: matplotlib/galleries/examples/user_interfaces/mplcvd.py
imports: import functools
  from pathlib import Path
  import colorspacious
  import numpy
label_desc: Use image node_id 7 for calling a global function with example usage: _setup_wx(tb) without return types