fixing the ensure index call to be proper pymongo