def scope_lookup(self, node, name, offset=<NUM_LIT:0>):
if name in self.scope_attrs and name not in self.locals:<EOL><INDENT>try:<EOL><INDENT>return self, self.getattr(name)<EOL><DEDENT>except exceptions.AttributeInferenceError:<EOL><INDENT>return self, ()<EOL><DEDENT><DEDENT>return self._scope_lookup(node, name, offset)<EOL>
Lookup where the given variable is assigned.

        :param node: The node to look for assignments up to.
            Any assignments after the given node are ignored.
        :type node: NodeNG

        :param name: The name of the variable to find assignments for.
        :type name: str

        :param offset: The line offset to filter statements up to.
        :type offset: int

        :returns: This scope node and the list of assignments associated to the
            given name according to the scope where it has been found (locals,
            globals or builtin).
        :rtype: tuple(str, list(NodeNG))