def METHOD_NAME(*args, **kwargs):
    data = json.loads(kwargs["data"])
    num_messages = len(data["messages"])
    response_text = json.dumps({"result": f"{num_messages} messages received"})
    mock_response = MagicMock()
    mock_response.text = response_text
    return mock_response