code: def main(args):
      if args.gpu:
          gpu_devices = tf.config.experimental.list_physical_devices(
              "GPU"
          )
          if any(gpu_devices):
              tf.config.experimental.set_memory_growth(
                  gpu_devices[0], True
              )
          else:
              raise AssertionError(
                  "TensorFlow cannot access your GPU. Please investigate!"
              )
      else:
          os.environ["CUDA_VISIBLE_DEVICES"] = ""
  
      # Pretrained imagenet model
      model = detection.__dict__[args.arch](
          pretrained=args.pretrained,
          pretrained_backbone=False,
          input_shape=(args.size, args.size, 3),
      )
  
      # Input
      img_tensor = tf.random.uniform(
          shape=[1, args.size, args.size, 3], maxval=1, dtype=tf.float32
      )
  
      # Warmup
      for _ in range(10):
          _ = model(img_tensor, training=False)
  
      timings = []
  
      # Evaluation runs
      for _ in range(args.it):
          start_ts = time.perf_counter()
          _ = model(img_tensor, training=False)
          timings.append(time.perf_counter() - start_ts)
  
      _timings = np.array(timings)
      print(
          f"{args.arch} ({args.it} runs on ({args.size}, {args.size}) inputs)"
      )
      print(
          f"mean {1000 * _timings.mean():.2f}ms, std {1000 * _timings.std():.2f}ms"
      )
  
imports: import argparse
  import os
  import time
  import numpy
  import tensorflow
  from doctr.models import detection
label_desc: Use image node_id 1 for calling a global function with example usage: main(args) without return types