class_docstr: Manager for actions triggered by user interactions (key press, toolbar
  clicks, ...) on a Figure.
  
  Attributes
  ----------
  figure : `.Figure`
  keypresslock : `~matplotlib.widgets.LockDraw`
      `.LockDraw` object to know if the `canvas` key_press_event is locked.
  messagelock : `~matplotlib.widgets.LockDraw`
      `.LockDraw` object to know if the message is available to write.
class_docstr_tok: ["Manager","for","actions","triggered","by","user","interactions","(","key","press",",","toolbar","clicks",",","...",")","on","a","Figure",".","Attributes","--","--","--","--","--","figure",":","`",".Figure","`","keypresslock",":","`","~matplotlib.widgets.LockDraw","`","`",".LockDraw","`","object","to","know","if","the","`","canvas","`","key_press_event","is","locked",".","messagelock",":","`","~matplotlib.widgets.LockDraw","`","`",".LockDraw","`","object","to","know","if","the","message","is","available","to","write","."]
docstr: Toggle tools, need to untoggle prior to using other Toggle tool.
  Called from trigger_tool.
  
  Parameters
  ----------
  tool : `.ToolBase`
  canvasevent : Event
      Original Canvas event or None.
  data : object
      Extra data to pass to the tool when triggering.
docstr_tok: ["Toggle","tools",",","need","to","untoggle","prior","to","using","other","Toggle","tool",".","Called","from","trigger_tool",".","Parameters","--","--","--","--","--","tool",":","`",".ToolBase","`","canvasevent",":","Event","Original","Canvas","event","or","None",".","data",":","object","Extra","data","to","pass","to","the","tool","when","triggering","."]
code: def _handle_toggle(self, tool, canvasevent, data):
      """
      Toggle tools, need to untoggle prior to using other Toggle tool.
      Called from trigger_tool.
  
      Parameters
      ----------
      tool : `.ToolBase`
      canvasevent : Event
          Original Canvas event or None.
      data : object
          Extra data to pass to the tool when triggering.
      """
  
      radio_group = tool.radio_group
      # radio_group None is not mutually exclusive
      # just keep track of toggled tools in this group
      if radio_group is None:
          if tool.name in self._toggled[None]:
              self._toggled[None].remove(tool.name)
          else:
              self._toggled[None].add(tool.name)
          return
  
      # If the tool already has a toggled state, untoggle it
      if self._toggled[radio_group] == tool.name:
          toggled = None
      # If no tool was toggled in the radio_group
      # toggle it
      elif self._toggled[radio_group] is None:
          toggled = tool.name
      # Other tool in the radio_group is toggled
      else:
          # Untoggle previously toggled tool
          self.trigger_tool(
              self._toggled[radio_group], self, canvasevent, data
          )
          toggled = tool.name
  
      # Keep track of the toggled tool in the radio_group
      self._toggled[radio_group] = toggled
  
imports: from matplotlib import _api, backend_tools, cbook, widgets
label_desc: Use image node_id 15 for calling the ToolManager obj's underlying member method code with example usage: obj._handle_toggle(tool, canvasevent, data) without return types