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"]
docstr: Sets the figure to interact with the tools
  
  Parameters
  ==========
  figure: `Figure`
  update_tools: bool
      Force tools to update figure
docstr_tok: ["Sets","the","figure","to","interact","with","the","tools","Parameters","==========","figure",":","`","Figure","`","update_tools",":","bool","Force","tools","to","update","figure"]
code: def set_figure(self, figure, update_tools=True):
      """
      Sets the figure to interact with the tools
  
      Parameters
      ==========
      figure: `Figure`
      update_tools: bool
          Force tools to update figure
      """
      if self._key_press_handler_id:
          self.canvas.mpl_disconnect(self._key_press_handler_id)
      self._figure = figure
      if figure:
          self._key_press_handler_id = self.canvas.mpl_connect(
              "key_press_event", self._key_press
          )
      if update_tools:
          for tool in self._tools.values():
              tool.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 5 for calling the ToolManager obj's underlying member method code with example usage: obj.set_figure(figure, update_tools) without return types