  
  # We store Tooltips, ContextMenus and Commands globally when they are created
  # Because we need to add them back to newly cloned widgets (they are not easily accessible from
  # original config or are prone to getting destroyed when the original widget is destroyed)
  _RECREATE_OBJECTS = dict(tooltips=dict(), commands=dict(), contextmenus=dict())
  
  
  def _get_tooltip(widget, text=None, text_variable=None, wrap_length=600):
      """ Store the tooltip layout and widget id in _TOOLTIPS and return a tooltip """
      _RECREATE_OBJECTS["tooltips"][str(widget)] = {"text": text,
 
</s> remove def _get_tooltip(widget, text=None, text_variable=None, wrap_length=600):
    """ Store the tooltip layout and widget id in _TOOLTIPS and return a tooltip """
 </s> add def _get_tooltip(widget, text=None, text_variable=None):
    """ Store the tooltip layout and widget id in _TOOLTIPS and return a tooltip.

    Auto adjust tooltip width based on amount of text.

    """ </s> remove                                                   "text_variable": text_variable,
                                                  "wrap_length": wrap_length}
    logger.debug("Adding to tooltips dict: (widget: %s. text: '%s', wrap_length: %s)",
                 widget, text, wrap_length)
 </s> add                                                   "text_variable": text_variable}
    logger.debug("Adding to tooltips dict: (widget: %s. text: '%s')", widget, text)

    wrap_length = 400
    if text is not None:
        while True:
            if len(text) < wrap_length * 5:
                break
            if wrap_length > 720:
                break
            wrap_length = int(wrap_length * 1.10)
 </s> remove         if len(self._model.output_names) == len(set(self._model.output_names)):
            logger.debug("Output names are unique, not rewriting: %s", self._model.output_names)
 </s> add         if len(self.model.output_names) == len(set(self.model.output_names)):
            logger.debug("Output names are unique, not rewriting: %s", self.model.output_names) </s> remove         new_config = dict()
 </s> add         new_config = {} </s> remove         retval = dict()
 </s> add         retval = {}
_RECREATE_OBJECTS = dict(tooltips={}, commands={}, contextmenus={})
  
  # We store Tooltips, ContextMenus and Commands globally when they are created
  # Because we need to add them back to newly cloned widgets (they are not easily accessible from
  # original config or are prone to getting destroyed when the original widget is destroyed)
_RECREATE_OBJECTS = dict(tooltips={}, commands={}, contextmenus={})
  
  
  def _get_tooltip(widget, text=None, text_variable=None, wrap_length=600):
      """ Store the tooltip layout and widget id in _TOOLTIPS and return a tooltip """
      _RECREATE_OBJECTS["tooltips"][str(widget)] = {"text": text,
keep keep keep keep replace keep keep keep keep keep
 Core updates
   - Change loss loading mechanism
   - Autosize tooltips based on content size
   - Random linting + code modernisation 
lib/gui/control_helper.py