code: def create_remote_experts(
      infos: Union[Sequence[Optional[ExpertInfo]], MPFuture],
      dht: DHT,
      return_future: bool = False,
  ) -> Union[List[Optional[RemoteExpert]], Future]:
      if return_future:
  
          async def _unpack(infos_future: MPFuture, dht: DHT):
              p2p = await dht.replicate_p2p()
              return _create_remote_experts(await infos_future, p2p)
  
          return RemoteExpertWorker.run_coroutine(
              _unpack(infos, dht), return_future
          )
  
      p2p = RemoteExpertWorker.run_coroutine(dht.replicate_p2p())
      return _create_remote_experts(infos, p2p)
  
imports: from __future__ import annotations
  from concurrent.futures import Future
  from typing import Any, Dict, Iterable, List, Optional, Sequence, Tuple, Union
  import torch
  import torch.nn
  from torch.autograd.function import once_differentiable
  from hivemind import moe
  from hivemind.compression import deserialize_tensor_stream, deserialize_torch_tensor, serialize_torch_tensor
  from hivemind.dht import DHT
  from hivemind.moe.client.remote_expert_worker import RemoteExpertWorker
  from hivemind.moe.expert_uid import ExpertInfo
  from hivemind.p2p import P2P, PeerID, StubBase
  from hivemind.p2p.p2p_daemon_bindings.control import DEFAULT_MAX_MSG_SIZE, MAX_UNARY_PAYLOAD_SIZE
  from hivemind.proto import runtime_pb2
  from hivemind.utils.asyncio import amap_in_executor, iter_as_aiter
  from hivemind.utils.mpfuture import MPFuture
  from hivemind.utils.nested import nested_compare, nested_flatten, nested_pack
  from hivemind.utils.serializer import MSGPackSerializer
  from hivemind.utils.streaming import split_for_streaming
label_desc: Use image node_id 3 for calling a global function with example usage: create_remote_experts(infos, dht, return_future) and returns: _create_remote_experts, RemoteExpertWorker, _create_remote_experts