human
Write me a code to and the other steps required given the following:

Please write code following the instructions in jupyter notebook style.
assistant
#Here is code to and the other steps required.

# future example.
import asyncio

async def slow_operation(future):
    try:
        await asyncio.wait_for(asyncio.sleep(1), 2) 
    except asyncio.TimeoutError:
        future.set_exception(ValueError("Error sleeping"))
    else:
        future.set_result('Future is done!')

def got_result(future):
    if future.exception():
        print("Exception:", type(future.exception()))
    else:
        print(future.result())
    loop.stop()

loop = asyncio.get_event_loop()

future = asyncio.Future()
future.add_done_callback(got_result)

asyncio.ensure_future(slow_operation(future))

loop.run_forever()

# выносим блокирующие вызовы в пул тредов
import asyncio
import requests

async def main():
    loop = asyncio.get_event_loop()
    future1 = loop.run_in_executor(None, requests.get, 'http://127.0.0.1:8000')
    future2 = loop.run_in_executor(None, requests.get, 'http://127.0.0.1:8000')
    response1 = await future1
    response2 = await future2
    print(response1.text)
    print(response2.text)

loop = asyncio.get_event_loop()
loop.run_until_complete(main())