code: def format_time(seconds):
      if seconds > 60:
          days, seconds = (
              int(seconds // SECONDS_IN_DAY),
              seconds % SECONDS_IN_DAY,
          )
          hours, seconds = (
              int(seconds // SECONDS_IN_HOUR),
              seconds % SECONDS_IN_HOUR,
          )
          minutes, seconds = (
              int(seconds // SECONDS_IN_MINUTE),
              seconds % SECONDS_IN_MINUTE,
          )
          if days:
              if minutes >= 30:
                  hours += 1
              return f"{days}d{hours}h"
          elif hours:
              if seconds >= 30:
                  minutes += 1
              return f"{hours}h{minutes}m"
          else:
              seconds = int(round(seconds))
              return f"{minutes}m{seconds}s"
      elif seconds > 1:
          return f"{seconds:.1f}s"
      elif seconds > 0.001:
          return f"{seconds * 1000:.1f}ms"
      else:
          return f"{seconds * 1000000:.1f}ns"
  
imports: import collections
  import functools
  import timeit
  import traceback
  import weakref
  from json import dumps
  from typing import List
  import numpy
  from .ascii_table import ascii_table
label_desc: Use image node_id 1 for calling a global function with example usage: format_time(seconds) and returns: days, str, hours, str, seconds, str, hours, str, minutes, str, minutes, str, seconds, str, unknown, str, unknown, str