code: function addDebugLayers (node, tree) {
      for (let layer in node) {
          let counts = node[layer];
          addLayerDebugEntry(tree, layer, counts.features, counts.geoms, counts.styles, counts.base);
          if (counts.layers) {
              tree[layer].layers = tree[layer].layers || {};
              addDebugLayers(counts.layers, tree[layer].layers); // process child layers
          }
      }
  }
docs: build debug stats layer tree