class_docstr: Displays a progress bar.
  
  Args:
      target: Total number of steps expected, None if unknown.
      width: Progress bar width on screen.
      verbose: Verbosity mode, 0 (silent), 1 (verbose), 2 (semi-verbose)
      stateful_metrics: Iterable of string names of metrics that should *not*
          be averaged over time. Metrics in this list will be displayed as-is.
          All others will be averaged by the progbar before display.
      interval: Minimum visual progress update interval (in seconds).
      unit_name: Display name for step counts (usually "step" or "sample").
class_docstr_tok: ["Displays","a","progress","bar",".","Args",":","target",":","Total","number","of","steps","expected",",","None","if","unknown",".","width",":","Progress","bar","width","on","screen",".","verbose",":","Verbosity","mode",",","0","(","silent",")",",","1","(","verbose",")",",","2","(","semi-verbose",")","stateful_metrics",":","Iterable","of","string","names","of","metrics","that","should","*","not","*","be","averaged","over","time",".","Metrics","in","this","list","will","be","displayed","as-is",".","All","others","will","be","averaged","by","the","progbar","before","display",".","interval",":","Minimum","visual","progress","update","interval","(","in","seconds",")",".","unit_name",":","Display","name","for","step","counts","(","usually","``","step","''","or","``","sample","''",")","."]
docstr: format a given duration to display to the user.
  
  Given the duration, this function formats it in either milliseconds
  or seconds and displays the unit (i.e. ms/step or s/epoch).
  
  Args:
      time_per_unit: the duration to display
      unit_name: the name of the unit to display
  
  Returns:
      A string with the correctly formatted duration and units
docstr_tok: ["format","a","given","duration","to","display","to","the","user",".","Given","the","duration",",","this","function","formats","it","in","either","milliseconds","or","seconds","and","displays","the","unit","(","i.e",".","ms\/step","or","s\/epoch",")",".","Args",":","time_per_unit",":","the","duration","to","display","unit_name",":","the","name","of","the","unit","to","display","Returns",":","A","string","with","the","correctly","formatted","duration","and","units"]
code: def _format_time(self, time_per_unit, unit_name):
      """format a given duration to display to the user.
  
      Given the duration, this function formats it in either milliseconds
      or seconds and displays the unit (i.e. ms/step or s/epoch).
  
      Args:
          time_per_unit: the duration to display
          unit_name: the name of the unit to display
  
      Returns:
          A string with the correctly formatted duration and units
      """
      formatted = ""
      if time_per_unit >= 1 or time_per_unit == 0:
          formatted += f" {time_per_unit:.0f}s/{unit_name}"
      elif time_per_unit >= 1e-3:
          formatted += f" {time_per_unit * 1000.0:.0f}ms/{unit_name}"
      else:
          formatted += f" {time_per_unit * 1000000.0:.0f}us/{unit_name}"
      return formatted
  
file_path: keras/keras/utils/progbar.py
imports: import math
  import os
  import sys
  import time
  from keras import backend
  from keras.api_export import keras_export
  from keras.utils import io_utils
label_desc: Use image node_id 4 for calling the Progbar obj's underlying member method code with example usage: obj._format_time(time_per_unit, unit_name) and returns: formatted