class_docstr: Interpret AST nodes to gleam useful debugging information. 
class_docstr_tok: ["Interpret","AST","nodes","to","gleam","useful","debugging","information","."]
code: def visit_Attribute(self, attr):
      if not isinstance(attr.ctx, ast.Load):
          return self.generic_visit(attr)
      source_explanation, source_result = self.visit(attr.value)
      explanation = "%s.%s" % (source_explanation, attr.attr)
      source = "__exprinfo_expr.%s" % (attr.attr,)
      co = self._compile(source)
      try:
          result = self.frame.eval(co, __exprinfo_expr=source_result)
      except Exception:
          raise Failure(explanation)
      explanation = "%s\n{%s = %s.%s\n}" % (
          self.frame.repr(result),
          self.frame.repr(result),
          source_explanation,
          attr.attr,
      )
      # Check if the attr is from an instance.
      source = "%r in getattr(__exprinfo_expr, '__dict__', {})"
      source = source % (attr.attr,)
      co = self._compile(source)
      try:
          from_instance = self.frame.eval(
              co, __exprinfo_expr=source_result
          )
      except Exception:
          from_instance = True
      if from_instance:
          rep = self.frame.repr(result)
          pattern = "%s\n{%s = %s\n}"
          explanation = pattern % (rep, rep, explanation)
      return explanation, result
  
imports: import sys
  import ast
  import py
  from py._code.assertion import _format_explanation, BuiltinAssertionError
label_desc: Use image node_id 13 for calling the DebugInterpreter obj's underlying member method code with example usage: obj.visit_Attribute(attr) and returns: explanation,  result, self