docs: function expandItem(data) {
      // Cloning to avoid modification of the original data item.
      data = JSON.parse(JSON.stringify(data));
  
      if (!data.expansions) {
          data.expansions = [];
      }
  
      // Expansions are stored in a tree structure.
      let obj = findExpansion.call(this, data.parent);
      obj.expansions.push(data);
  }