import asyncio


def create_future(loop: asyncio.AbstractEventLoop) -> asyncio.Future:
    """
    Return a Future, using the loop if possible.

    loop.create_future() is better, but was only added in Python 3.5.2, see:

    https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.AbstractEventLoop.create_future
    """
    if hasattr(loop, 'create_future'):
        return loop.create_future()
    return asyncio.Future(loop=loop)