class_docstr: An implementation of a distributed and asynchronised neighbor sampler
  used by :class:`~torch_geometric.distributed.DistNeighborLoader`.
class_docstr_tok: ["An","implementation","of","a","distributed","and","asynchronised","neighbor","sampler","used","by",":","class",":","`","~torch_geometric.distributed.DistNeighborLoader","`","."]
code: def register_sampler_rpc(self) -> None:
      partition2workers = rpc_partition_to_workers(
          current_ctx=self.current_ctx,
          num_partitions=self.graph_store.num_partitions,
          current_partition_idx=self.graph_store.partition_idx,
      )
      self.rpc_router = RPCRouter(partition2workers)
      self.feature_store.set_rpc_router(self.rpc_router)
  
      rpc_sample_callee = RPCSamplingCallee(self)
      self.rpc_sample_callee_id = rpc_register(rpc_sample_callee)
  
imports: import itertools
  import logging
  import math
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  import torch.multiprocessing
  from torch import Tensor
  from torch_geometric.distributed import LocalFeatureStore, LocalGraphStore
  from torch_geometric.distributed.dist_context import DistContext
  from torch_geometric.distributed.event_loop import ConcurrentEventLoop, to_asyncio_future
  from torch_geometric.distributed.rpc import RPCCallBase, RPCRouter, rpc_async, rpc_partition_to_workers, rpc_register
  from torch_geometric.distributed.utils import BatchDict, NodeDict, remove_duplicates
  from torch_geometric.sampler import EdgeSamplerInput, HeteroSamplerOutput, NegativeSampling, NeighborSampler, NodeSamplerInput, SamplerOutput
  from torch_geometric.sampler.base import NumNeighbors, SubgraphType
  from torch_geometric.sampler.neighbor_sampler import neg_sample
  from torch_geometric.sampler.utils import remap_keys
  from torch_geometric.typing import EdgeType, NodeType
label_desc: Use image node_id 3 for calling the DistNeighborSampler obj's underlying member method code with example usage: obj.register_sampler_rpc() without return types