class_docstr: A process that accepts incoming requests to experts and submits them into the corresponding TaskPool.
  
  :note: ConnectionHandler is designed so as to allow using multiple handler processes for the same port
  :param dht: a running hivemind.dht.DHT, used to let other peers connect to this one
  :param module_backends: a dict [UID -> ModuleBackend] with all active experts
code: def __init__(
      self,
      dht: DHT,
      module_backends: Dict[str, ModuleBackend],
      *,
      balanced: bool = True,
      shutdown_timeout: float = 3,
      start: bool = False,
  ):
      super().__init__()
      self.dht, self.module_backends = dht, module_backends
      self.balanced, self.shutdown_timeout = balanced, shutdown_timeout
      self._p2p: Optional[P2P] = None
  
      self._inner_pipe, self._outer_pipe = mp.Pipe(duplex=False)
      self.ready = MPFuture()
  
      if start:
          self.run_in_background(await_ready=True)
  
imports: import asyncio
  import multiprocessing
  from typing import AsyncIterator, Dict, Iterable, List, Optional, Tuple, Union
  import torch
  from hivemind.compression import deserialize_tensor_stream, deserialize_torch_tensor, serialize_torch_tensor
  from hivemind.dht import DHT
  from hivemind.moe.server.module_backend import ModuleBackend
  from hivemind.moe.server.task_pool import TaskPool
  from hivemind.p2p import P2PContext, ServicerBase
  from hivemind.p2p.p2p_daemon import DEFAULT_MAX_MSG_SIZE, P2P
  from hivemind.proto import runtime_pb2
  from hivemind.utils import MPFuture, MSGPackSerializer, as_aiter, get_logger, nested_flatten
  from hivemind.utils.asyncio import amap_in_executor, switch_to_uvloop
  from hivemind.utils.streaming import split_for_streaming
  from hivemind.utils.tensor_descr import BatchTensorDescriptor
label_desc: Use image node_id 1 to create a new ConnectionHandler object from inherited base classes: mp.context, ServicerBase with example: obj = ConnectionHandler(dht, module_backends)