def METHOD_NAME(received_message, type, varname, value):
    assert isinstance(received_message, dict)
    assert "name" in received_message and received_message["name"] == "message"
    assert "args" in received_message
    args = received_message["args"]
    assert "type" in args and args["type"] == type
    assert "payload" in args
    payload = args["payload"][0]
    assert "name" in payload and varname in payload["name"]
    assert "payload" in payload and "value" in payload["payload"] and payload["payload"]["value"] == value
    logging.getLogger().debug(payload["payload"]["value"])