code: def cleanup(self):
          
          for _id, shard in self._shards.items():
              if shard.get('isServer', False):
                  Servers().remove(shard['_id'])
              if shard.get('isReplicaSet', False):
                  ReplicaSets().remove(shard['_id'])
  
          for mongos in self._routers:
              Servers().remove(mongos)
  
          for config_id in self._configsvrs:
              self.configdb_singleton.remove(config_id)
  
          self._configsvrs = []
          self._routers = []
          self._shards = {}
docs: cleanup configuration: stop and remove all servers