class_docstr: maximum-compatibility tqdm-based progressbars
class_docstr_tok: ["maximum-compatibility","tqdm-based","progressbars"]
docstr: inject `ncols_desc` to fill the display width (`ncols`)
docstr_tok: ["inject","`","ncols_desc","`","to","fill","the","display","width","(","`","ncols","`",")"]
code: def format_dict(self):
      """inject `ncols_desc` to fill the display width (`ncols`)"""
      d = super().format_dict
      ncols: int = d["ncols"] or 80
      # assumes `bar_format` has max one of ("ncols_desc" & "ncols_info")
      ncols_left = (
          ncols
          - len(
              self.format_meter(  # type: ignore[call-arg]
                  ncols_desc=1, ncols_info=1, **d
              )
          )
          + 1
      )
      ncols_left = max(ncols_left, 0)
      if ncols_left:
          d["ncols_desc"] = d["ncols_info"] = ncols_left
      else:
          # work-around for zero-width description
          d["ncols_desc"] = d["ncols_info"] = 1
          d["prefix"] = ""
      return d
  
file_path: dvc/dvc/progress.py
imports: import logging
  import sys
  from threading import RLock
  from typing import TYPE_CHECKING
  from tqdm import tqdm
  from dvc.env import DVC_IGNORE_ISATTY
  from dvc.utils import env2bool
label_desc: Use image node_id 7 for calling the Tqdm obj's underlying member method code with example usage: obj.format_dict() and returns: d