How to fix pymongo.errors.ConnectionFailure: connection closed in Python | DevErrors