code: def _check_cluster_size(self, min_nodes):
          
          # finding all node groups with an unsatisfied amount of nodes
          unsatisfied = 0
          for kind, required in min_nodes.items():
              available = len(self.nodes[kind])
              if available < required:
                  log.error(
                      "Not enough nodes of kind `%s`:"
                      " %d required, but only %d available.",
                  )
                  unsatisfied += 1
  
          if unsatisfied:
              raise ClusterSizeError()
docs: Checks the size of the cluster to fit the needs of the user. It
          considers the minimum values for the node groups if present.
          Otherwise it will imply the user wants the amount of specified
          nodes at least.
  
          :param min_nodes: minimum number of nodes for each kind
          :type min_nodes: dict [node_kind] = number
          :raises: ClusterError in case the size does not fit the minimum
                   number specified by the user.