class_docstr: Renders custom on done for jina progress bar.
class_docstr_tok: ["Renders","custom","on","done","for","jina","progress","bar","."]
docstr: Create a ProgressBar column with a final message
  
  Example:
  .. highlight:: python
  .. code-block:: python
  
      def on_done(task):
          return f'{task.completed} steps done in {task.finished_time:.0f} seconds'
  
  
      column = _OnDoneColumn(text_on_done_format=on_done)  # functional
  
      column = _OnDoneColumn(
          text_on_done_format='{task.completed} steps done in {task.finished_time:.0f} seconds'
      )  # formatting
  
  
  :param text_on_done_format: message_on_done
  :param text_init_format: string to be formatted with task or a function which take task as input
  :param style: rich style for the Text
  :param table_column: rich table column
docstr_tok: ["Create","a","ProgressBar","column","with","a","final","message","Example",":","..","highlight",":",":","python","..","code-block",":",":","python","def","on_done","(","task",")",":","return","f","'","{","task.completed","}","steps","done","in","{","task.finished_time",":",".0f","}","seconds'","column","=","_OnDoneColumn","(","text_on_done_format=on_done",")","#","functional","column","=","_OnDoneColumn","(","text_on_done_format=","'","{","task.completed","}","steps","done","in","{","task.finished_time",":",".0f","}","seconds'",")","#","formatting",":","param","text_on_done_format",":","message_on_done",":","param","text_init_format",":","string","to","be","formatted","with","task","or","a","function","which","take","task","as","input",":","param","style",":","rich","style","for","the","Text",":","param","table_column",":","rich","table","column"]
code: def __init__(
      self,
      text_on_done_format: Union[str, Callable],
      text_init_format: str = "",
      style: Optional[str] = None,
      table_column: Optional[Column] = None,
  ):
      """
      Create a ProgressBar column with a final message
  
      Example:
      .. highlight:: python
      .. code-block:: python
  
          def on_done(task):
              return f'{task.completed} steps done in {task.finished_time:.0f} seconds'
  
  
          column = _OnDoneColumn(text_on_done_format=on_done)  # functional
  
          column = _OnDoneColumn(
              text_on_done_format='{task.completed} steps done in {task.finished_time:.0f} seconds'
          )  # formatting
  
  
      :param text_on_done_format: message_on_done
      :param text_init_format: string to be formatted with task or a function which take task as input
      :param style: rich style for the Text
      :param table_column: rich table column
      """
      super().__init__(table_column)
      self.text_on_done_format = text_on_done_format
      self.text_init_format = text_init_format
      self.style = style
  
imports: import time
  import typing
  from functools import wraps
  from typing import Optional, Union, Callable
  from jina.constants import __windows__
  from jina.helper import get_readable_size, get_readable_time, colored, get_rich_console
  from rich.progress import Progress, Task, BarColumn, TimeRemainingColumn, SpinnerColumn, TimeElapsedColumn, TextColumn, ProgressColumn, TaskID
  from rich.text import Text
  from rich.table import Column
  from rich.console import Console
label_desc: Use image node_id 1 to create a new _OnDoneColumn object from inherited base classes: ProgressColumn with example: obj = _OnDoneColumn(text_on_done_format, text_init_format, style, table_column)