function getUpperFunction(node) {
	for (
		let currentNode = node;
		currentNode;
		currentNode = currentNode.parent
	) {
		if (anyFunctionPattern.test(currentNode.type)) {
			return currentNode;
		}
	}
	return null;
}
Finds a function node from ancestors of a node.
@param {ASTNode} node A start node to find.
@returns {Node|null} A found function node.