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: Return the tool object with the given name.
  
  For convenience, this passes tool objects through.
  
  Parameters
  ----------
  name : str or `.ToolBase`
      Name of the tool, or the tool itself.
  warn : bool, default: True
      Whether a warning should be emitted it no tool with the given name
      exists.
  
  Returns
  -------
  `.ToolBase` or None
      The tool or None if no tool with the given name exists.
docstr_tok: ["Return","the","tool","object","with","the","given","name",".","For","convenience",",","this","passes","tool","objects","through",".","Parameters","--","--","--","--","--","name",":","str","or","`",".ToolBase","`","Name","of","the","tool",",","or","the","tool","itself",".","warn",":","bool",",","default",":","True","Whether","a","warning","should","be","emitted","it","no","tool","with","the","given","name","exists",".","Returns","--","--","--","-","`",".ToolBase","`","or","None","The","tool","or","None","if","no","tool","with","the","given","name","exists","."]
code: def get_tool(self, name, warn=True):
      """
      Return the tool object with the given name.
  
      For convenience, this passes tool objects through.
  
      Parameters
      ----------
      name : str or `.ToolBase`
          Name of the tool, or the tool itself.
      warn : bool, default: True
          Whether a warning should be emitted it no tool with the given name
          exists.
  
      Returns
      -------
      `.ToolBase` or None
          The tool or None if no tool with the given name exists.
      """
      if (
          isinstance(name, backend_tools.ToolBase)
          and name.name in self._tools
      ):
          return name
      if name not in self._tools:
          if warn:
              _api.warn_external(
                  f"ToolManager does not control tool {name!r}"
              )
          return None
      return self._tools[name]
  
imports: from matplotlib import _api, backend_tools, cbook, widgets
label_desc: Use image node_id 19 for calling the ToolManager obj's underlying member method code with example usage: obj.get_tool(name, warn) and returns: self, name, None