class_docstr: A super-simple branch coverage tracer.
class_docstr_tok: ["A","super-simple","branch","coverage","tracer","."]
code: def trace(self, frame, event, arg):
      if event == "call":
          return self.trace
      elif event == "line":
          # manual inlining of self.trace_line for performance.
          fname = frame.f_code.co_filename
          if should_trace_file(fname):
              current_location = (fname, frame.f_lineno)
              self.branches.add(
                  (self._previous_location, current_location)
              )
              self._previous_location = current_location
  
imports: import functools
  import os
  import subprocess
  import sys
  import types
  from collections import defaultdict
  from functools import lru_cache, reduce
  from os import sep
  from pathlib import Path
  from typing import TYPE_CHECKING, Dict, List, Optional, Set, Tuple
  from hypothesis._settings import Phase, Verbosity
  from hypothesis.internal.escalation import is_hypothesis_file
label_desc: Use image node_id 2 for calling the Tracer obj's underlying member method code with example usage: obj.trace(frame, event, arg) and returns: self