code: def __get_label_to_output_comm_rank(
      min_batch_id, max_batch_id, n_workers
  ):
      num_batches = max_batch_id - min_batch_id + 1
      num_batches = int(num_batches)
      z = cp.zeros(num_batches, dtype="int32")
      s = cp.array_split(cp.arange(num_batches), n_workers)
      for i, t in enumerate(s):
          z[t] = i
  
      return z
  
imports: from __future__ import annotations
  import warnings
  import numpy
  from dask import delayed
  from dask.distributed import Lock, get_client, wait
  import dask_cudf
  import cudf
  import cupy
  from pylibcugraph import ResourceHandle
  from pylibcugraph import uniform_neighbor_sample
  from cugraph.dask.comms import comms
  from cugraph.dask import get_n_workers
  from typing import Sequence, List, Union, Tuple
  from typing import TYPE_CHECKING
  from cugraph.dask.common.part_utils import get_persisted_df_worker_map, persist_dask_df_equal_parts_per_worker
label_desc: Use image node_id 3 for calling a global function with example usage: __get_label_to_output_comm_rank(min_batch_id, max_batch_id, n_workers) and returns: z