code: def progress_bar(
      iterator,
      ncols=None,
      bar_format="{l_bar}{bar:36}| {n_fmt}/{total_fmt} {elapsed}<{remaining}, {rate_fmt}{postfix}",
      leave=True,
  ):
      return tqdm(
          iterator,
          ncols=ncols,
          bar_format=bar_format,
          ascii=True,
          disable=(not is_master()),
          leave=leave,
      )
  
imports: from collections.abc import Iterable
  import nltk
  from tqdm import tqdm
  from underthesea.utils.sp_parallel import is_master
label_desc: Use image node_id 1 for calling a global function with example usage: progress_bar(iterator, ncols, bar_format, leave) and returns: tqdm