code: def unlink(fig, *, verbose=None):
      """Remove all links involving the event channel of the given figure.
  
      Parameters
      ----------
      fig : matplotlib.figure.Figure | Figure3D
          The figure whose event channel should be unlinked from all other event
          channels.
      %(verbose)s
      """
      linked_figs = _event_channel_links.get(fig)
      if linked_figs is not None:
          for linked_fig in linked_figs.keys():
              del _event_channel_links[linked_fig][fig]
              if len(_event_channel_links[linked_fig]) == 0:
                  del _event_channel_links[linked_fig]
      if (
          fig in _event_channel_links
      ):  # need to check again because of weak refs
          del _event_channel_links[fig]
  
imports: import contextlib
  import re
  import weakref
  from dataclasses import dataclass
  from typing import Optional, Union
  from matplotlib.colors import Colormap
  from ..utils import _validate_type, fill_doc, logger, verbose, warn
label_desc: Use image node_id 6 for calling a global function with example usage: unlink(fig) without return types