async def get_stream_message(client: aioredis.Redis, stream: str, message_id: str):
    """Fetch a stream message and format it as a (message_id, fields) pair"""
    response = await client.xrange(stream, min=message_id, max=message_id)
    assert len(response) == 1
    return response[0]
Fetch a stream message and format it as a (message_id, fields) pair
tests/test_commands.py