class_docstr: An internal class that runs butterfly AllReduce in a predefined group of averagers.
  
  This class inherits hivemind.p2p.ServicerBase, so it can be used as an RPCServicer for testing purposes without
  creating a full DecentralizedAverager.
  
  :note: this class returns **differences** between averaged and local tensors in order to improve numerical stability
  :param p2p: a hivemind.p2p.P2P instance used for communication with other peers
  :param servicer_type: a hivemind.p2p.ServicerBase subclass whose RPC signatures are used
    when requesting other peers. Typically, it is DecentralizedAverager, its derivative,
    or AllReduceRunner itself (for testing purposes).
  :param prefix: namespace for servicer's RPCs (typically, equal to prefix for group keys)
  :param group_id: unique identifier of this specific all-reduce run
  :param tensors: local tensors that should be averaged with groupmates
  :param weight: scalar weight of this peer's tensors in the average (doesn't need to sum up to 1)
  :param peer_id: your peer_id, must be included in ordered_peer_ids
  :param ordered_peer_ids: group peer_ids ordered s.t. i-th peer_id is responsible for averaging i-th part
  :param peer_fractions: for each peer, a target fraction of vector elements that this peer should average
    (the actual number of values by peer will be nearly proportional, but there are no exact guarantees)
  :param modes: AveragingMode for each peer in ordered_peer_ids (normal, client-only or auxiliary)
  :param sender_timeout: during all_reduce, any sender that fails to send tensor chunk within this many seconds from
    previous chunk will be marked as failed and excluded from averaging. default: equal to next_chunk_timeout
  :param reducer_timeout: during all_reduce, any reducer that fails to send results chunk within this many seconds
    from previous chunk will be marked as failed and excluded from averaging. default: 2 x sender_timeout
  :param kwargs: additional parameters (e.g. part_size_bytes) will be passed to TensorPartContainer
  :note: Full-mode peers send and receive tensor parts concurrently, assuming a full-duplex TCP stream. In turn,
    non-averaging peers receive results only after they finish sending, which helps them avoid
    throughput issues in case of asymmetric high-latency connections (e.g. ACK compression).
code: def __contains__(self, peer_id: PeerID):
      return peer_id in self.ordered_peer_ids
  
imports: import asyncio
  from enum import Enum
  from typing import AsyncIterator, Optional, Sequence, Set, Tuple, Type
  import torch
  from hivemind.averaging.partition import AllreduceException, BannedException, TensorPartContainer, TensorPartReducer
  from hivemind.compression import deserialize_torch_tensor, serialize_torch_tensor
  from hivemind.p2p import P2P, P2PContext, PeerID, ServicerBase, StubBase
  from hivemind.proto import averaging_pb2
  from hivemind.utils import get_logger
  from hivemind.utils.asyncio import achain, aiter_with_timeout, amap_in_executor, anext, as_aiter, attach_event_on_finished
label_desc: Use image node_id 4 for calling the AllReduceRunner obj's underlying member method code with example usage: obj.__contains__(peer_id) and returns: unknown