def METHOD_NAME(test_worker):
    task_id = uuid.uuid1()
    task_body = test_worker.serializer.serialize((failing_function, (), {}))
    task_message = Task(task_id, "RAW", task_body).pack()
    result = test_worker._worker_execute_task(str(task_id), task_message)
    assert isinstance(result, dict)
    assert "data" in result
    result = messagepack.unpack(result["data"])
    assert isinstance(result, messagepack.message_types.Result)
    assert result.task_id == task_id
    # error string contains the KeyError which failed
    assert "KeyError" in result.data
    assert result.is_error is True
    assert isinstance(
        result.error_details, messagepack.message_types.ResultErrorDetails
    )
    assert result.error_details.code == "RemoteExecutionError"
    assert (
        result.error_details.user_message
        == "An error occurred during the execution of this task"
    )