code: function getElementToolStateManager(element) {
    const enabledElement = external.cornerstone.getEnabledElement(element);
    // If the enabledElement has no toolStateManager, create a default one for it
    // NOTE: This makes state management element specific
  
    if (enabledElement.toolStateManager === undefined) {
      enabledElement.toolStateManager = globalImageIdSpecificToolStateManager;
    }
  
    return enabledElement.toolStateManager;
  }
docs: Returns the toolstate for a specific element.
  @public
  @function getElementToolStateManager
  
  @param  {HTMLElement} element The element.
  @returns {Object} The toolState.