def infer_attribute(self, context=None):
for owner in self.expr.infer(context):<EOL><INDENT>if owner is util.Uninferable:<EOL><INDENT>yield owner<EOL>continue<EOL><DEDENT>if context and context.boundnode:<EOL><INDENT>if isinstance(owner, bases.Instance) and isinstance(<EOL>context.boundnode, bases.Instance<EOL>):<EOL><INDENT>try:<EOL><INDENT>if helpers.is_subtype(<EOL>helpers.object_type(context.boundnode),<EOL>helpers.object_type(owner),<EOL>):<EOL><INDENT>owner = context.boundnode<EOL><DEDENT><DEDENT>except exceptions._NonDeducibleTypeHierarchy:<EOL><INDENT>pass<EOL><DEDENT><DEDENT><DEDENT>try:<EOL><INDENT>context.boundnode = owner<EOL>yield from owner.igetattr(self.attrname, context)<EOL>context.boundnode = None<EOL><DEDENT>except (exceptions.AttributeInferenceError, exceptions.InferenceError):<EOL><INDENT>context.boundnode = None<EOL><DEDENT>except AttributeError:<EOL><INDENT>context.boundnode = None<EOL><DEDENT><DEDENT>return dict(node=self, context=context)<EOL>
infer an Attribute node by using getattr on the associated object