

def _get_objective_scope(self, node):
    current_scope = self.get_current_scope()
    scope_visibility_hint = detect_scope_visibility(node, current_scope)
    scope_visibility = scope_visibility_hint['scope_visibility']
    if (scope_visibility is ScopeVisibility.GLOBAL_LIKE):
        return self.get_global_scope()
    if (scope_visibility is ScopeVisibility.SCRIPT_LOCAL):
        return self.get_script_local_scope()
    return current_scope

dataset/ETHPy150Open Kuniwak/vint/vint/ast/plugin/scope_plugin/scope_linker.py ScopeLinker.ScopeTreeBuilder._get_objective_scope/original