class_docstr: Helper class that groups all the user interactions for a Figure
  
  Attributes
  ----------
  figure: `Figure`
  keypresslock: `widgets.LockDraw`
      `LockDraw` object to know if the `canvas` key_press_event is locked
  messagelock: `widgets.LockDraw`
      `LockDraw` object to know if the message is available to write
class_docstr_tok: ["Helper","class","that","groups","all","the","user","interactions","for","a","Figure","Attributes","--","--","--","--","--","figure",":","`","Figure","`","keypresslock",":","`","widgets.LockDraw","`","`","LockDraw","`","object","to","know","if","the","`","canvas","`","key_press_event","is","locked","messagelock",":","`","widgets.LockDraw","`","`","LockDraw","`","object","to","know","if","the","message","is","available","to","write"]
code: def __init__(self, figure=None):
      warnings.warn(
          "Treat the new Tool classes introduced in v1.5 as "
          + "experimental for now, the API will likely change in "
          + "version 2.1 and perhaps the rcParam as well"
      )
  
      self._key_press_handler_id = None
  
      self._tools = {}
      self._keys = {}
      self._toggled = {}
      self._callbacks = cbook.CallbackRegistry()
  
      # to process keypress event
      self.keypresslock = widgets.LockDraw()
      self.messagelock = widgets.LockDraw()
  
      self._figure = None
      self.set_figure(figure)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  import warnings
  import matplotlib.cbook
  import matplotlib.widgets
  from matplotlib.rcsetup import validate_stringlist
  import matplotlib.backend_tools
label_desc: Use image node_id 1 to create a new ToolManager object from inherited base classes: object with example: obj = ToolManager(figure)