code: def test_detection_zoo(arch_name):
      # Model
      predictor = detection.zoo.detection_predictor(
          arch_name, pretrained=False
      )
      predictor.model.eval()
      # object check
      assert isinstance(predictor, DetectionPredictor)
      input_tensor = torch.rand((2, 3, 1024, 1024))
      if torch.cuda.is_available():
          predictor.model.cuda()
          input_tensor = input_tensor.cuda()
  
      with torch.no_grad():
          out, seq_maps = predictor(input_tensor, return_maps=True)
      assert all(isinstance(boxes, dict) for boxes in out)
      assert all(
          isinstance(boxes[CLASS_NAME], np.ndarray)
          and boxes[CLASS_NAME].shape[1] == 5
          for boxes in out
      )
      assert all(
          isinstance(seq_map, np.ndarray) for seq_map in seq_maps
      )
      assert all(
          seq_map.shape[:2] == (1024, 1024) for seq_map in seq_maps
      )
      # check that all values in the seq_maps are between 0 and 1
      assert all(
          (seq_map >= 0).all() and (seq_map <= 1).all()
          for seq_map in seq_maps
      )
  
file_path: doctr/tests/pytorch/test_models_detection_pt.py
imports: import os
  import tempfile
  import numpy
  import onnxruntime
  import pytest
  import torch
  from doctr.file_utils import CLASS_NAME
  from doctr.models import detection
  from doctr.models.detection._utils import dilate, erode
  from doctr.models.detection.predictor import DetectionPredictor
  from doctr.models.utils import export_model_to_onnx
label_desc: Use image node_id 2 for calling a global function with example usage: test_detection_zoo(arch_name) without return types