def close(self):
        """Release resources.

        Note it is not safe to call this method from __del__ or any GC hooks.
        """
        self.client_ref = None
        self.key_vault_coll = None
        if self.mongocryptd_client:
            self.mongocryptd_client.close()
            self.mongocryptd_client = None
Release resources.

        Note it is not safe to call this method from __del__ or any GC hooks.
        
stackoverflow/venv/lib/python3.6/site-packages/pymongo/encryption.py