code: def scope_lookup(self, node, name, offset=0):
          
          # pylint: disable=no-member; github.com/pycqa/astroid/issues/291
          # args is in fact redefined later on by postinit. Can't be changed
          # to None due to a strong interaction between Lambda and FunctionDef.
  
          if node in self.args.defaults or node in self.args.kw_defaults:
              frame = self.parent.frame()
              # line offset to avoid that def func(f=func) resolve the default
              # value to the defined function
              offset = -1
          else:
              # check this is not used in function decorators
              frame = self
          return frame._scope_lookup(node, name, offset)
docs: Lookup where the given names 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 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))