code: def instance_attr(self, name, context=None):
          
          # Return a copy, so we don't modify self.instance_attrs,
          # which could lead to infinite loop.
          values = list(self.instance_attrs.get(name, []))
          # get all values from parents
          for class_node in self.instance_attr_ancestors(name, context):
              values += class_node.instance_attrs[name]
          values = [n for n in values if not isinstance(n, node_classes.DelAttr)]
          if values:
              return values
          raise exceptions.AttributeInferenceError(
              target=self, attribute=name, context=context
          )
docs: Get the list of nodes associated to the given attribute name.
  
          Assignments are looked for in both this class and in parents.
  
          :returns: The list of assignments to the given name.
          :rtype: list(NodeNG)
  
          :raises AttributeInferenceError: If no attribute with this name
              can be found in this class or parent classes.