class_docstr: Manages a single virtual progress bar on the driver.
  
  The actual position of individual bars is calculated as (pos_offset + position),
  where `pos_offset` is the position offset determined by the BarManager.
class_docstr_tok: ["Manages","a","single","virtual","progress","bar","on","the","driver",".","The","actual","position","of","individual","bars","is","calculated","as","(","pos_offset","+","position",")",",","where","`","pos_offset","`","is","the","position","offset","determined","by","the","BarManager","."]
docstr: Initialize a bar.
  
  Args:
      state: The initial progress bar state.
      pos_offset: The position offset determined by the BarManager.
docstr_tok: ["Initialize","a","bar",".","Args",":","state",":","The","initial","progress","bar","state",".","pos_offset",":","The","position","offset","determined","by","the","BarManager","."]
code: def __init__(self, state: ProgressBarState, pos_offset: int):
      """Initialize a bar.
  
      Args:
          state: The initial progress bar state.
          pos_offset: The position offset determined by the BarManager.
      """
      self.state = state
      self.pos_offset = pos_offset
      self.bar = real_tqdm.tqdm(
          desc=state["desc"] + " " + str(state["pos"]),
          total=state["total"],
          position=pos_offset + state["pos"],
          leave=False,
      )
      if state["x"]:
          self.bar.update(state["x"])
  
imports: import builtins
  import copy
  import json
  import logging
  import os
  import sys
  import threading
  import time
  import uuid
  from typing import Any, Dict, Iterable, Optional
  import colorama
  import ray
  from ray._private.ray_constants import env_bool
  from ray.util.debug import log_once
label_desc: Use image node_id 1 to create a new _Bar object  with example: obj = _Bar(state, pos_offset)