@Override
  public void visit(final Bytes location, final ExtensionNode<V> extensionNode) {
    if (!extensionNode.isDirty()) {
      return;
    }

    final Node<V> child = extensionNode.getChild();
    if (child.isDirty()) {
      child.accept(Bytes.concatenate(location, extensionNode.getPath()), this);
    }
    if (child.isHealNeeded()
        || !isInRange(
            Bytes.concatenate(location, extensionNode.getPath()), startKeyPath, endKeyPath)) {
      extensionNode.markHealNeeded(); // not save an incomplete node
    }

    maybeStoreNode(location, extensionNode);
  }
Visits an extension node during a traversal operation.

<p>This method is called when visiting an extension node. It checks if the node is marked as
"dirty" (indicating changes that have not been persisted). If the node is clean, the method
returns immediately. For dirty nodes, it recursively visits any dirty child nodes,
concatenating the current location with the extension node's path to form the full path to the
child.

<p>Additionally, it checks if the child node requires healing (e.g., if it's falls outside the
specified range defined by {@code startKeyPath} and {@code endKeyPath}). If healing is needed,
the extension node is marked accordingly.

<p>Finally, it attempts to persist the extension node if applicable.

@param location The current location represented as {@link Bytes}.
@param extensionNode The extension node being visited.
ethereum/trie/src/main/java/org/hyperledger/besu/ethereum/trie/SnapCommitVisitor.java