class_docstr: Base class for P2P RPC stubs. The interface mimics gRPC stubs.
  
  Servicer derives stub classes for particular services (e.g. DHT, averager, etc.) from StubBase,
  adding the necessary rpc_* methods. Calls to these methods are translated to calls to the remote peer.
class_docstr_tok: ["Base","class","for","P2P","RPC","stubs",".","The","interface","mimics","gRPC","stubs",".","Servicer","derives","stub","classes","for","particular","services","(","e.g",".","DHT",",","averager",",","etc",".",")","from","StubBase",",","adding","the","necessary","rpc_","*","methods",".","Calls","to","these","methods","are","translated","to","calls","to","the","remote","peer","."]
code: def __init__(self, p2p: P2P, peer: PeerID, namespace: Optional[str]):
      self._p2p = p2p
      self._peer = peer
      self._namespace = namespace
  
file_path: hivemind/hivemind/p2p/servicer.py
imports: import asyncio
  import inspect
  from dataclasses import dataclass
  from typing import Any, AsyncIterator, List, Optional, Tuple, Type, get_type_hints
  from hivemind.p2p.p2p_daemon import P2P
  from hivemind.p2p.p2p_daemon_bindings.datastructures import PeerID
label_desc: Use image node_id 1 to create a new StubBase object  with example: obj = StubBase(p2p, peer, namespace)