code: def format_time(time_us: int) -> str:
      r"""Returns a formatted time string."""
      US_IN_SECOND = 1000.0 * 1000.0
      US_IN_MS = 1000.0
      if time_us >= US_IN_SECOND:
          return "{:.3f}s".format(time_us / US_IN_SECOND)
      if time_us >= US_IN_MS:
          return "{:.3f}ms".format(time_us / US_IN_MS)
      return "{:.3f}us".format(time_us)
  
imports: import functools
  from collections import OrderedDict, defaultdict, namedtuple
  from typing import Any, List, NamedTuple, Optional, Tuple
  import torch
  import torch.profiler
label_desc: Use image node_id 7 for calling a global function with example usage: format_time(time_us) and returns: str, str, str