code: def sync_object_ranks(
      something_to_sync: Any, reference_rank: int, device: torch.device
  ) -> Any:
      package = [something_to_sync]
      dist.broadcast_object_list(
          package, src=reference_rank, group=dist.group.WORLD
      )
      package_sync = package[0]
      return package_sync
  
imports: import copy
  from math import inf
  import tempfile
  from typing import Any, Dict, Type, cast
  import unittest
  import numpy
  import pytest
  import torch
  import torch.distributed
  import torch.multiprocessing
  from torch.nn.parallel import DistributedDataParallel
  from fairscale.fair_dev.testing.testing import check_same_model_params, check_same_models_across_ranks, skip_if_no_cuda, skip_if_py39_no_cuda, skip_if_single_gpu
  from fairscale.internal import torch_version
  import fairscale.optim
label_desc: Use image node_id 2 for calling a global function with example usage: sync_object_ranks(something_to_sync, reference_rank, device) and returns: package_sync