code: def create_index(self, index, index_type=GEO2D):
          
          self.logger.info("Adding %s index to stores on attribute: %s" % (index_type, index))
          yield self.collection.create_index([(index, index_type)])
docs: Create an index on a given attribute
  
          :param str index: Attribute to set index on
          :param str index_type: See PyMongo index types for further information, defaults to GEO2D index.