code: def main(args):
      device = torch.device("cuda:0" if args.gpu else "cpu")
  
      # Pretrained imagenet model
      model = (
          recognition.__dict__[args.arch](
              pretrained=args.pretrained,
              pretrained_backbone=False,
          )
          .eval()
          .to(device=device)
      )
  
      # Input
      img_tensor = torch.rand(
          (args.batch_size, 3, args.size, 4 * args.size)
      ).to(device=device)
  
      # Warmup
      for _ in range(10):
          _ = model(img_tensor)
  
      timings = []
  
      # Evaluation runs
      for _ in range(args.it):
          start_ts = time.perf_counter()
          _ = model(img_tensor)
          timings.append(time.perf_counter() - start_ts)
  
      _timings = np.array(timings)
      print(
          f"{args.arch} ({args.it} runs on ({args.size}, {4 * args.size}) inputs in batches of {args.batch_size})"
      )
      print(
          f"mean {1000 * _timings.mean():.2f}ms, std {1000 * _timings.std():.2f}ms"
      )
  
imports: import argparse
  import os
  import time
  import numpy
  import torch
  from doctr.models import recognition
label_desc: Use image node_id 1 for calling a global function with example usage: main(args) without return types