'Disconnect from MongoDB.
Close all sockets in the connection pools and stop the monitor threads.
If this instance is used again it will be automatically re-opened and
the threads restarted.'

def close(self):

    self._process_periodic_tasks()
    self._topology.close()
