def METHOD_NAME(
    oci_resource: gci.componentmodel.Resource,
    clamav_client: clamav.client.ClamAVClient,
    oci_client: oc.Client,
):
    access: gci.componentmodel.OciAccess = oci_resource.access
    try:
        clamav_findings = _scan_oci_image(
            clamav_client=clamav_client,
            oci_client=oci_client,
            image_reference=access.imageReference,
        )
        return clamav.model.MalwareScanResult(
                resource=oci_resource,
                scan_state=clamav.model.MalwareScanState.FINISHED_SUCCESSFULLY,
                findings=[
                    f'{path}: {scan_result.virus_signature()}'
                    for scan_result, path in clamav_findings
                ],
            )
    except (requests.exceptions.RequestException, socket.gaierror) as e:
        # log warning and include it as finding to document it via the generated report-mails
        warning = f'error while scanning {oci_resource.access.imageReference} {e=}'
        logger.warning(warning)
        traceback.print_exc()
        return clamav.model.MalwareScanResult(
                resource=oci_resource,
                scan_state=clamav.model.MalwareScanState.FINISHED_WITH_ERRORS,
                findings=[warning],
            )