class_docstr: Interpret AST nodes to gleam useful debugging information. 
class_docstr_tok: ["Interpret","AST","nodes","to","gleam","useful","debugging","information","."]
code: def generic_visit(self, node):
      # Fallback when we don't have a special implementation.
      if _is_ast_expr(node):
          mod = ast.Expression(node)
          co = self._compile(mod)
          try:
              result = self.frame.eval(co)
          except Exception:
              raise Failure()
          explanation = self.frame.repr(result)
          return explanation, result
      elif _is_ast_stmt(node):
          mod = ast.Module([node])
          co = self._compile(mod, "exec")
          try:
              self.frame.exec_(co)
          except Exception:
              raise Failure()
          return None, None
      else:
          raise AssertionError("can't handle %s" % (node,))
  
imports: import sys
  import ast
  import py
  from py._code.assertion import _format_explanation, BuiltinAssertionError
label_desc: Use image node_id 2 for calling the DebugInterpreter obj's underlying member method code with example usage: obj.generic_visit(node) and returns: explanation,  result, None,  None