code: def placement(
      compute_device: str,
      rank: int,
      local_size: int,
  ) -> str:
      """
      Returns placement, formatted as string
      """
  
      param_device = compute_device
      if compute_device in {"cuda", "mtia"}:
          param_device = torch.device(compute_device, rank % local_size)
      return f"rank:{rank}/{param_device}"
  
file_path: torchrec/torchrec/distributed/planner/utils.py
imports: import operator
  from functools import reduce
  from typing import Any, cast, Dict, Iterable, List, Optional, Type, Union
  import torch
  from torchrec.distributed.planner.types import Perf, ShardingOption, Storage
  from torchrec.distributed.types import ShardingType
label_desc: Use image node_id 6 for calling a global function with example usage: placement(compute_device, rank, local_size) and returns: str, rank, str, param_device