code: def _bcast_requests(self, force=False) -> RequestBatch:
      if self.is_rank_0:
          if not self.scheduled_requests and not force:
              return self.scheduled_requests
          # Rank 0 gets batch of requests and broadcasts to other ranks
          data_dicts = self.scheduled_requests.to_msg_dicts()
          json_data = ujson.dumps(data_dicts)
          self.socket.send_string(json_data)
      else:
          try:
              json_data = self.socket.recv_string()
              data_dicts = ujson.loads(json_data)
              self.scheduled_requests = RequestBatch.from_msg_dicts(
                  data_dicts
              )
          except zmq.Again:
              self.scheduled_requests = RequestBatch()
  
      return self.scheduled_requests
  
imports: import copy
  import gc
  import os
  import queue
  import random
  import threading
  import time
  from collections import deque, defaultdict
  from functools import cached_property
  from typing import Dict, Tuple, List, Any, Union, DefaultDict
  import torch
  import ujson
  import zmq
  from deepspeed.accelerator import get_accelerator
  from deepspeed.utils.timer import SynchronizedWallClockTimer
  from mii.batching.constants import TOP_K_NAME, TOP_P_NAME, TEMP_NAME, SAMPLER_NAME, STOP_NAME
  from mii.batching.data_classes import Response, Request, RequestBatch
  from mii.batching.generation.logit_processors import TopPLogitProcessor, TopKLogitProcessor, TemperatureLogitProcessor
  from mii.batching.generation.samplers import LogitsSampler, GreedySampler
  from mii.batching.generation.stop_criterion import EosGenerationStopCriterion, TokenStopCriterion
  from mii.batching.postprocess import run_batch_logit_processing, run_batch_sampler, run_batch_stop_criterion
  from mii.batching.utils import sync_debug, profiler
  from mii.config import GenerateParamsConfig
  from mii.constants import GenerationFinishReason, ZMQ_RECV_TIMEOUT
  from mii.logging import logger
label_desc: Use image node_id 6 for calling the RaggedBatchBase obj's underlying member method code with example usage: obj._bcast_requests(force) and returns: self, self