code: def _remove(self, shard_name):
          
          result = self.router_command("removeShard", shard_name, is_eval=False)
          if result['ok'] == 1 and result['state'] == 'completed':
              shard = self._shards.pop(shard_name)
              if shard.get('isServer', False):
                  Servers().remove(shard['_id'])
              if shard.get('isReplicaSet', False):
                  ReplicaSets().remove(shard['_id'])
          return result
docs: remove member from configuration