class_docstr: Strategy for training with multiple processes in parallel.
class_docstr_tok: ["Strategy","for","training","with","multiple","processes","in","parallel","."]
docstr: Reduces a boolean decision over distributed processes. By default is analagous to ``all`` from the standard
  library, returning ``True`` only if all input decisions evaluate to ``True``. If ``all`` is set to ``False``,
  it behaves like ``any`` instead.
  
  Args:
      decision: A single input decision.
      all: Whether to logically emulate ``all`` or ``any``. Defaults to True.
  
  Returns:
      bool: The reduced boolean decision.
docstr_tok: ["Reduces","a","boolean","decision","over","distributed","processes",".","By","default","is","analagous","to","``","all","``","from","the","standard","library",",","returning","``","True","``","only","if","all","input","decisions","evaluate","to","``","True","``",".","If","``","all","``","is","set","to","``","False","``",",","it","behaves","like","``","any","``","instead",".","Args",":","decision",":","A","single","input","decision",".","all",":","Whether","to","logically","emulate","``","all","``","or","``","any","``",".","Defaults","to","True",".","Returns",":","bool",":","The","reduced","boolean","decision","."]
code: def reduce_boolean_decision(
      self, decision: bool, all: bool = True
  ) -> bool:
      """Reduces a boolean decision over distributed processes. By default is analagous to ``all`` from the standard
      library, returning ``True`` only if all input decisions evaluate to ``True``. If ``all`` is set to ``False``,
      it behaves like ``any`` instead.
  
      Args:
          decision: A single input decision.
          all: Whether to logically emulate ``all`` or ``any``. Defaults to True.
  
      Returns:
          bool: The reduced boolean decision.
  
      """
      decision = torch.tensor(int(decision), device=self.root_device)
      decision = self.all_reduce(
          decision,
          reduce_op=ReduceOp.SUM,  # type: ignore[arg-type]
      )
      decision = (
          bool(decision == self.world_size) if all else bool(decision)
      )
      return decision
  
imports: from abc import ABC
  from typing import Any, Dict, List, Optional
  import torch
  from torch import Tensor
  from typing_extensions import override
  from lightning.fabric.accelerators.accelerator import Accelerator
  from lightning.fabric.plugins.environments.cluster_environment import ClusterEnvironment
  from lightning.fabric.plugins.io.checkpoint_io import CheckpointIO
  from lightning.fabric.plugins.precision import Precision
  from lightning.fabric.strategies.strategy import Strategy
  from lightning.fabric.utilities.distributed import _all_gather_ddp_if_available
  from lightning.fabric.utilities.types import ReduceOp
label_desc: Use image node_id 11 for calling the ParallelStrategy obj's underlying member method code with example usage: obj.reduce_boolean_decision(decision, all) and returns: decision