function walk(node, depth) {
      const childIds = Object.keys(node);

      childIds.forEach(id => {
        const child = node[id];
        if (child.children) {
          walk(child.children, depth + 1);
        } else {
          // if the node doesn't have a children field, then it is a leaf, so +1
          chainCount++;
        }
      }, '');
    }
@param {LH.Audit.Details.SimpleCriticalRequestNode} node
@param {number} depth