code: def setup(figure):
      tb = figure.canvas.toolbar
      if tb is None:
          return
      for cls in type(tb).__mro__:
          pkg = cls.__module__.split(".")[0]
          if pkg != "matplotlib":
              break
      if pkg == "gi":
          _setup_gtk(tb)
      elif pkg in ("PyQt5", "PySide2", "PyQt6", "PySide6"):
          _setup_qt(tb)
      elif pkg == "tkinter":
          _setup_tk(tb)
      elif pkg == "wx":
          _setup_wx(tb)
      else:
          raise NotImplementedError(
              "The current backend is not supported"
          )
  
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 3 for calling a global function with example usage: setup(figure) without return types