code: def render_progress_bar(
      tracker, input_num_partitions, output_num_partitions
  ):
      from tqdm import tqdm
  
      num_map = 0
      num_reduce = 0
      map_bar = tqdm(total=input_num_partitions, position=0)
      map_bar.set_description("Map Progress.")
      reduce_bar = tqdm(total=output_num_partitions, position=1)
      reduce_bar.set_description("Reduce Progress.")
  
      while (
          num_map < input_num_partitions
          or num_reduce < output_num_partitions
      ):
          new_num_map, new_num_reduce = ray.get(
              tracker.get_progress.remote()
          )
          map_bar.update(new_num_map - num_map)
          reduce_bar.update(new_num_reduce - num_reduce)
          num_map = new_num_map
          num_reduce = new_num_reduce
          time.sleep(0.1)
      map_bar.close()
      reduce_bar.close()
  
imports: import time
  from typing import Any, Callable, Iterable, List, Tuple, Union
  import ray
  from ray import ObjectRef
  from ray.cluster_utils import Cluster
label_desc: Use image node_id 2 for calling a global function with example usage: render_progress_bar(tracker, input_num_partitions, output_num_partitions) without return types