code: function addFrameOfReferenceSpecificToolState(
      frameOfReference,
      toolType,
      data
    ) {
      // If we don't have any tool state for this frameOfReference, add an empty object
      if (toolState.hasOwnProperty(frameOfReference) === false) {
        toolState[frameOfReference] = {};
      }
  
      const frameOfReferenceToolState = toolState[frameOfReference];
  
      // If we don't have tool state for this type of tool, add an empty object
      if (frameOfReferenceToolState.hasOwnProperty(toolType) === false) {
        frameOfReferenceToolState[toolType] = {
          data: [],
        };
      }
  
      const toolData = frameOfReferenceToolState[toolType];
  
      // Finally, add this new tool to the state
      toolData.data.push(data);
    }
docs: Here we add tool state, this is done by tools as well As modules that restore saved state