function findClosestParentOfType(node, types) {
            if (!node.parent) {
                return null
            }
            if (types.indexOf(node.parent.type) === -1) {
                return findClosestParentOfType(node.parent, types)
            }
            return node.parent
        }
Find the closest parent matching a list of types.
@param {ASTNode} node The node whose parents we are searching
@param {Array} types The node types to match
@returns {ASTNode} The matched node or undefined.