def METHOD_NAME(
    self, report: Union[TestCaseReport, TestGroupReport]
) -> Generator:
    """
    Context manager that enables source code tracing
    and covered lines data saving to report at exit.
    """
    if self._tracer is None or self._disabled:
        yield
    else:
        self._tracer.erase()
        self._tracer.start()
        try:
            yield
        finally:
            # exception shall bubble out
            self._tracer.stop()
            data = self._tracer.get_data()
            if data is not None and data.measured_files():
                common_lines = self._get_common_lines(data)
                # set or merge the common lines
                if len(common_lines):
                    if report.covered_lines is None:
                        report.covered_lines = common_lines
                    else:
                        for k, v in common_lines.items():
                            report.covered_lines[
                                k
                            ] = report.covered_lines.get(k, set()).union(
                                set(v)
                            )