class_docstr: _PyTorchReducerContext is a component of the PyTorchTrialContext which does not interact with
  the rest of the PyTorchTrialContext.  It has been separated into its own object to keep the
  size of PyTorchTrialContext down, and because there may be a future where we can create a
  _PyTorchReducerContext as a standalone feature for users of the Core API... though in that
  case we would rename it with a public name first.
class_docstr_tok: ["_PyTorchReducerContext","is","a","component","of","the","PyTorchTrialContext","which","does","not","interact","with","the","rest","of","the","PyTorchTrialContext",".","It","has","been","separated","into","its","own","object","to","keep","the","size","of","PyTorchTrialContext","down",",","and","because","there","may","be","a","future","where","we","can","create","a","_PyTorchReducerContext","as","a","standalone","feature","for","users","of","the","Core","API","...","though","in","that","case","we","would","rename","it","with","a","public","name","first","."]
code: def __init__(
      self,
      allgather_fn: Callable[[Any], List[Any]] = default_allgather_fn,
  ) -> None:
      self._wrapped_reducers = []  # type: List[_WrappedReducer]
      self._allgather_fn = allgather_fn
  
imports: import abc
  import enum
  import itertools
  from typing import Any, Callable, Dict, List, Optional, TypeVar, Union, overload
  import numpy
label_desc: Use image node_id 1 to create a new _PyTorchReducerContext object  with example: obj = _PyTorchReducerContext(allgather_fn)