def _get(self, queue):
        if queue in self._fanout_queues:
            try:
                msg = next(self._get_broadcast_cursor(queue))
            except __HOLE__:
                msg = None
        else:
            msg = self.messages.find_and_modify(
                query={'queue': queue},
                sort=[('priority', pymongo.ASCENDING),
                      ('$natural', pymongo.ASCENDING)],
                remove=True,
            )

        if self.ttl:
            self._update_queues_expire(queue)

        if msg is None:
            raise Empty()

        return loads(bytes_to_str(msg['payload']))
dataset/ETHPy150Open celery/kombu/kombu/transport/mongodb.py/Channel._get