def METHOD_NAME(self, scan_report: Report) -> None:
    # We might want to convert this to one call for all results (all files), but then we would also have to deal
    # with repo size issues. Because the primary use case for this at the moment is VSCode integration, which
    # runs one file at a time, this can wait.
    sorted_by_file = sorted(scan_report.failed_checks, key=lambda c: c.file_abs_path)
    for file, sorted_failed_checks in groupby(sorted_by_file, key=lambda c: c.file_abs_path):
        failed_checks = [fc for fc in sorted_failed_checks if fc.check_id in metadata_integration.check_metadata]
        if not failed_checks:
            continue
        with open(file, 'r') as reader:
            file_contents = reader.read()
        fixes = self._get_fixes_for_file(scan_report.check_type, file, file_contents, failed_checks)
        if not fixes:
            continue
        all_fixes = fixes['fixes']
        # a mapping of (checkov_check_id, resource_id) to the failed check Record object for lookup later
        # guaranteed to map to exactly one record
        failed_check_by_check_resource: dict[tuple[str, str], Record] = {
            k: list(v)[0] for k, v in groupby(failed_checks, key=lambda c: (c.check_id, c.resource))
        }
        for fix in all_fixes:
            ckv_id = metadata_integration.get_ckv_id_from_bc_id(fix['policyId'])
            if not ckv_id:
                logging.debug(f"BC ID {fix['policyId']} has no checkov ID - might be a cloned policy")
                ckv_id = fix.get('policyId', '')
            failed_check = failed_check_by_check_resource.get((ckv_id, fix['resourceId']))  # type:ignore[arg-type]  # ckv_id is not None here
            if not failed_check:
                logging.warning(f'Could not find the corresponding failed check for the fix for ID {ckv_id} and resource {fix["resourceId"]}')
                continue
            failed_check.fixed_definition = fix['fixedDefinition']