def path_to_coverage_result(path: Path, strict_default: bool) -> lsp.TypeCoverageResult:
    module = statistics.parse_path_to_module(path)
    if (module is None):
        raise lsp.RequestCancelledError(f'Unable to compute coverage information for {path}')
    coverage_collector = coverage_collector_for_module(str(path), module, strict_default)
    covered_and_uncovered_lines = coverage_collector.covered_and_uncovered_lines()
    uncovered_ranges = [f.code_range for f in coverage_collector.uncovered_functions()]
    return to_coverage_result(covered_and_uncovered_lines, uncovered_ranges)
def path_to_coverage_result(path: Path, strict_default: bool) -> lsp.TypeCoverageResult:
    module = statistics.parse_path_to_module(path)
    if (module is None):
        raise lsp.RequestCancelledError(f'Unable to compute coverage information for {path}')
    coverage_collector = coverage_collector_for_module(str(path), module, strict_default)
    covered_and_uncovered_lines = coverage_collector.covered_and_uncovered_lines()
    uncovered_ranges = [f.code_range for f in coverage_collector.uncovered_functions()]
    return to_coverage_result(covered_and_uncovered_lines, uncovered_ranges)