<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

async def consume_events(self):
        ''' begin listening to messages that were entered after starting'''
        # begin by making sure the channel is created
        await self.create_channel()
        # get cursor method
        def create_cursor():
            now = datetime.datetime.utcnow()
            dummy_id = ObjectId.from_datetime(now)
            return self._collection.find({'_id': {'$gte': dummy_id}}, cursor_type=CursorType.TAILABLE_AWAIT)
        # get cursor and start the loop
        cursor = create_cursor()
        while self.active:
            if cursor.alive:
                if (await cursor.fetch_next):
                    message = cursor.next_object()
                    event = message['key']
                    data = message['data']
                    logger.debug('event: %s - %s', event, data)
                    for sub in self._subscribers[event]:
                        await sub.deliver({'type': 'event', 'payload': {'name': event, 'data': data}})
            else:
                await asyncio.sleep(0.1)
                cursor = create_cursor()