function normalizeScope(initialScope, node) {
    let scope = getInnermostScope(initialScope, node)

    while (scope && scope.block === node) {
        scope = scope.upper
    }

    return scope
}
Find the scope that a given node belongs to.
@param {Scope} initialScope The initial scope to find.
@param {Node} node The AST node.
@returns {Scope} The scope that the node belongs to.