code: def _get_remote_device_str(rank, device_type, num_devices_per_node):
      if device_type.lower() == "cpu":
          return f"rank:{rank}/{device_type}"
      else:
          return (
              f"rank:{rank}/{device_type}:{rank % num_devices_per_node}"
          )
  
file_path: pytorch/torch/distributed/fsdp/_shard_utils.py
imports: import copy
  import itertools
  import math
  from typing import Optional
  import torch
  import torch.distributed
  from torch.distributed import distributed_c10d
  from torch.distributed._shard.sharded_tensor import Shard, ShardedTensor, ShardedTensorMetadata, TensorProperties
  from torch.distributed._shard.sharding_spec import ShardMetadata
  from torch.distributed._tensor import DeviceMesh, DTensor, Replicate, Shard
label_desc: Use image node_id 1 for calling a global function with example usage: _get_remote_device_str(rank, device_type, num_devices_per_node) and returns: str, rank, str, device_type, str, rank, str, device_type, str, unknown