async def METHOD_NAME(websocket: fastapi.WebSocket, worker_id: str, worker_config: inference.WorkerConfig):
    """
    Run a compliance check for the given worker:
    - Find a suitable compliance check assistant message
    - Task the worker with generating a response with the same context
    - Compare the respons against the existing completed message
    - Update the database with the outcome
    """
    async with deps.manual_create_session() as session:
        try:
            worker = await worker_utils.get_worker(worker_id, session)
            if worker.in_compliance_check:
                logger.info(f"Worker {worker.id} is already in compliance check")
                return
            worker.in_compliance_check_since = datetime.datetime.utcnow()
        finally:
            await session.commit()
    logger.info(f"Running compliance check for worker {worker_id}")
    async with deps.manual_create_session(autoflush=False) as session:
        compliance_check = models.DbWorkerComplianceCheck(worker_id=worker_id)
        try:
            message = await find_compliance_work_request_message(session, worker_config, worker_id)
            if message is None:
                logger.warning(
                    f"Could not find message for compliance check for worker {worker_id} with config {worker_config}"
                )
                return
            compliance_check.compare_worker_id = message.worker_id
            compliance_work_request = await worker_utils.build_work_request(session, message.id)
            logger.info(f"Found work request for compliance check for worker {worker_id}: {compliance_work_request}")
            await worker_utils.send_worker_request(websocket, compliance_work_request)
            response = None
            while True:
                response = await worker_utils.receive_worker_response(websocket)
                if response.response_type == "error":
                    compliance_check.responded = True
                    compliance_check.error = response.error
                    logger.warning(f"Worker {worker_id} errored during compliance check: {response.error}")
                    return
                if response.response_type == "generated_text":
                    break
            if response is None:
                logger.warning(f"Worker {worker_id} did not respond to compliance check")
                return
            compliance_check.responded = True
            response = cast(inference.GeneratedTextResponse, response)
            passes = response.text == message.content
            compliance_check.passed = passes
            logger.info(f"Worker {worker_id} passed compliance check: {passes}")
        finally:
            compliance_check.end_time = datetime.datetime.utcnow()
            session.add(compliance_check)
            worker = await worker_utils.get_worker(worker_id, session)
            worker.next_compliance_check = datetime.datetime.utcnow() + datetime.timedelta(
                seconds=settings.compliance_check_interval
            )
            worker.in_compliance_check_since = None
            logger.info(f"set next compliance check for worker {worker_id} to {worker.next_compliance_check}")
            await session.commit()
            await session.flush()