code: def test_timing(key):
      """Measure the timing of a single model."""
      reset_cfg()
      load_cfg(model_zoo.get_config_file(key))
      cfg.PREC_TIME.WARMUP_ITER, cfg.PREC_TIME.NUM_ITER = 5, 50
      cfg.OUT_DIR, cfg.LOG_DEST = tempfile.mkdtemp(), "file"
      dist.multi_proc_run(num_proc=cfg.NUM_GPUS, fun=trainer.time_model)
      log_file = os.path.join(cfg.OUT_DIR, "stdout.log")
      data = logging.sort_log_data(logging.load_log_data(log_file))[
          "iter_times"
      ]
      shutil.rmtree(cfg.OUT_DIR)
      return data
  
imports: import datetime
  import json
  import os
  import shutil
  import tempfile
  import unittest
  import pycls.core.builders
  import pycls.core.distributed
  import pycls.core.logging
  import pycls.core.net
  import pycls.core.trainer
  import pycls.models.model_zoo
  from parameterized import parameterized
  from pycls.core.config import cfg, load_cfg, reset_cfg
label_desc: Use image node_id 2 for calling a global function with example usage: test_timing(key) and returns: data