from unittest.mock import Mock


def make_coroutine_returning(return_value):
    """
    A utility function used to create coroutines that return a specific value.
    :param return_value: The value that the coroutine should return when awaited.
    :return: A mock coroutine
    """
    async def mock_coroutine(*args, **kwargs):
        return return_value

    return Mock(wraps=mock_coroutine)