def METHOD_NAME(self, frame, event, arg):
    if event == "call":
        return self.METHOD_NAME
    elif event == "line":
        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