code: def test_script(self, input_param, input_shape):
      # test whether support torchscript
      returned_layers = [1]
      anchor_generator = AnchorGeneratorWithAnchorShape(
          feature_map_scales=(1, 2),
          base_anchor_shapes=((8,) * input_param["spatial_dims"],),
      )
      detector = retinanet_resnet50_fpn_detector(
          **input_param,
          anchor_generator=anchor_generator,
          returned_layers=returned_layers,
      )
      with eval_mode(detector):
          input_data = torch.randn(input_shape)
          test_script_save(detector.network, input_data)
  
file_path: MONAI/tests/test_retinanet_detector.py
imports: from __future__ import annotations
  import random
  import unittest
  import torch
  from parameterized import parameterized
  from monai.apps.detection.networks.retinanet_detector import RetinaNetDetector, retinanet_resnet50_fpn_detector
  from monai.apps.detection.utils.anchor_utils import AnchorGeneratorWithAnchorShape
  from monai.networks import eval_mode, train_mode
  from monai.utils import optional_import
  from tests.utils import SkipIfBeforePyTorchVersion, skip_if_quick, test_script_save
label_desc: Use image node_id 3 for calling the TestRetinaNetDetector obj's underlying member method code with example usage: obj.test_script(input_param, input_shape) without return types