code: function getStackSpecificToolState(element, toolType) {
      // If this is a tool type to apply to the stack, do so
      if (toolTypes.indexOf(toolType) >= 0) {
        // If we don't have tool state for this type of tool, add an empty object
        if (toolState.hasOwnProperty(toolType) === false) {
          toolState[toolType] = {
            data: [],
          };
        }
  
        return toolState[toolType];
      }
  
      // Call the imageId specific tool state manager
      return oldStateManager.get(element, toolType);
    }
docs: Here you can get state - used by tools as well as modules That save state persistently