async def METHOD_NAME():
    servicebus_client = ServiceBusClient.from_connection_string(conn_str=CONNECTION_STR)
    async with servicebus_client:
        async with servicebus_client.get_queue_sender(queue_name=QUEUE_NAME) as sender:
            msgs_to_send = [ServiceBusMessage("session message: {}".format(i)) for i in range(10)]
            await sender.send_messages(msgs_to_send)
            print('Send messages to non-sessionful queue.')
        # Can also be called via "with AutoLockRenewer() as renewer" to automate shutdown.
        renewer = AutoLockRenewer()
        async with servicebus_client.get_queue_receiver(queue_name=QUEUE_NAME, prefetch_count=10) as receiver:
            received_msgs = await receiver.receive_messages(max_message_count=10, max_wait_time=5)
            for msg in received_msgs:
                # automatically renew the lock on each message for 100 seconds
                renewer.register(receiver, msg, max_lock_renewal_duration=100)
            print('Register messages into AutoLockRenewer done.')
            await asyncio.sleep(100)  # message handling for long period (E.g. application logic)
            for msg in received_msgs:
                await receiver.complete_message(msg)
            print('Complete messages.')
        await renewer.close()