code: def _format_duration(self, duration):
      days, rem = divmod(duration, 60 * 60 * 24)
      hours, rem = divmod(rem, 60 * 60)
      minutes, seconds = divmod(rem, 60)
      days = int(days)
      hours = int(hours)
      minutes = int(minutes)
      ret = ""
      if days > 0:
          ret += f"{days}d"
      if days > 0 or hours > 0:
          ret += f"{hours}h"
      if days > 0 or hours > 0 or minutes > 0:
          ret += f"{minutes}m"
      ret += f"{seconds:.2f}s"
      return ret
  
imports: import math
  import sys
  import time
  import warnings
  from typing import Dict, Union
  from poutyne.framework.callbacks.progress_bar import ProgressBar
  from poutyne.utils import is_in_jupyter_notebook
label_desc: Use image node_id 19 for calling the ColorProgress obj's underlying member method code with example usage: obj._format_duration(duration) and returns: ret