def get_collection(self) -> Collection:
    '\n        Ensure the collection is exists and indexed properly\n        '
    coll = get_db()[self.get_collection_name()]
    coll.create_index([('items', pymongo.ASCENDING)], unique=True)
    coll.create_index([('expires', pymongo.ASCENDING)], expireAfterSeconds=0)
    return coll
Ensure the collection is exists and indexed properly
def get_collection(self) -> Collection:
    '\n        \n        '
    coll = get_db()[self.get_collection_name()]
    coll.create_index([('items', pymongo.ASCENDING)], unique=True)
    coll.create_index([('expires', pymongo.ASCENDING)], expireAfterSeconds=0)
    return coll