code: def _pause_all_nodes(self, max_thread_pool_size=0):
          
          failed = 0
  
          def _pause_specific_node(node):
              if not node.instance_id:
                  log.warning("Node `%s` has no instance id."
                              " It is either already stopped, or"
                              " never created properly.  Not attempting"
                              " to stop it again.", node.name)
                  return None
              try:
                  return node.pause()
              except Exception as err:
                  log.error(
                      "Could not stop node `%s` (instance ID `%s`): %s %s",
                      node.name, node.instance_id, err, err.__class__)
                  node.update_ips()
                  return None
  
          nodes = self.get_all_nodes()
          thread_pool = self._make_thread_pool(max_thread_pool_size)
          for node, state in zip(nodes, thread_pool.map(_pause_specific_node, nodes)):
              if state is None:
                  failed += 1
              else:
                  self.paused_nodes[node.name] = state
  
          return failed
docs: Pause all cluster nodes - ensure that we store data so that in
          the future the nodes can be restarted.
  
          :return: int - number of failures.