function pruneIrrelevantSubtrees(node) {
		for (const key of visitorKeys[node.type]) {
			if (Array.isArray(node[key])) {
				for (let index = node[key].length - 1; index >= 0; index--) {
					const [childNode] = node[key].splice(index, 1);

					if (!reproducesBadCase(recast.print(parseResult).code)) {
						node[key].splice(index, 0, childNode);
						if (childNode) {
							pruneIrrelevantSubtrees(childNode);
						}
					}
				}
			} else if (typeof node[key] === "object" && node[key] !== null) {
				const childNode = node[key];

				if (isMaybeExpression(childNode)) {
					node[key] = {
						type: "Identifier",
						name: generateNewIdentifierName(),
						range: childNode.range,
					};
					if (!reproducesBadCase(recast.print(parseResult).code)) {
						node[key] = childNode;
						pruneIrrelevantSubtrees(childNode);
					}
				} else if (isStatement(childNode)) {
					node[key] = {
						type: "EmptyStatement",
						range: childNode.range,
					};
					if (!reproducesBadCase(recast.print(parseResult).code)) {
						node[key] = childNode;
						pruneIrrelevantSubtrees(childNode);
					}
				}
			}
		}
	}
Recursively removes descendant subtrees of the given AST node and replaces
them with simplified variants to produce a simplified AST which is still considered "bad".
@param {ASTNode} node An AST node to prune. May be mutated by this call, but the
resulting AST will still produce "bad" source code.
@returns {void}