code: def _create_remote_experts(
      infos: Sequence[Optional[ExpertInfo]], p2p: P2P
  ) -> List[Optional[RemoteExpert]]:
      experts: List[Optional[RemoteExpert]] = []
      for info in infos:
          if info is not None:
              experts.append(RemoteExpert(info, p2p))
          else:
              experts.append(None)
      return experts
  
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 2 for calling a global function with example usage: _create_remote_experts(infos, p2p) and returns: experts