class_docstr: Implementation of the Communicator class via torch.distributed. Use this
  communicator to communicate between different processes, potentially,
  running on different nodes.
docstr: Broadcasts a given object to all parties.
code: def broadcast_obj(self, obj, src, group=None):
      """Broadcasts a given object to all parties."""
      if group is None:
          group = self.main_group
  
      if self.rank == src:
          assert (
              obj is not None
          ), "src party must provide obj for broadcast"
          buf = pickle.dumps(obj)
          size = torch.tensor(len(buf), dtype=torch.int32)
          arr = torch.from_numpy(
              numpy.copy(numpy.frombuffer(buf, dtype=numpy.int8))
          )
  
          dist.broadcast(size, src, group=group)
          dist.broadcast(arr, src, group=group)
      else:
          size = torch.tensor(1, dtype=torch.int32)
          dist.broadcast(size, src, group=group)
  
          data = torch.empty(size=(size,), dtype=torch.int8)
          dist.broadcast(data, src, group=group)
          buf = data.numpy().tobytes()
          obj = serial.restricted_loads(buf)
      return obj
  
imports: import logging
  import os
  import pickle
  import random
  import string
  import numpy
  import torch
  import torch.distributed
  from crypten.common import serial
  from torch.distributed import ReduceOp
  from .communicator import _logging, Communicator
label_desc: Use image node_id 19 for calling the DistributedCommunicator obj's underlying member method code with example usage: obj.broadcast_obj(obj, src, group) and returns: obj