code: def duration_to_string(duration, units=None, precision=2):
      if units is None:
          if duration > 1:
              return str(round(duration, precision)) + " s"
          elif duration * 10**3 > 1:
              return str(round(duration * 10**3, precision)) + " ms"
          elif duration * 10**6 > 1:
              return str(round(duration * 10**6, precision)) + " us"
          else:
              return str(duration)
      else:
          if units == "us":
              return (
                  str(round(duration * 10.0**6, precision))
                  + " "
                  + units
              )
          elif units == "ms":
              return (
                  str(round(duration * 10.0**3, precision))
                  + " "
                  + units
              )
          else:
              return str(round(duration, precision)) + " s"
  
imports: import time
  import torch
  import torch.nn
  import torch.nn.functional
  from functools import partial
  from typing import List, Optional
  from collections import OrderedDict
  import numpy
label_desc: Use image node_id 41 for calling a global function with example usage: duration_to_string(duration, units, precision) and returns: unknown, unknown, unknown, unknown, unknown, unknown, str