code: def test_slicer_result(self, args, input_data):
      output_file, data = DetectionWriter(**args)(input_data)
      self.assertEqual(os.path.exists(output_file), True)
      file_ext = "".join(
          pathlib.Path(input_data["image_path"]).suffixes
      )
      self.assertIn(file_ext.lower(), [".nii", ".nii.gz"])
      file_ext = "".join(pathlib.Path(output_file).suffixes)
      self.assertIn(file_ext.lower(), [".json"])
      with open(output_file) as f:
          data = json.load(f)
          self.assertEqual(
              data["markups"][0]["center"],
              [
                  37.552398681640625,
                  -153.95179748535156,
                  -230.80540466308594,
              ],
          )
          self.assertEqual(
              data["markups"][0]["size"],
              [8.199199676513672, 8.1875, 8.257399559020996],
          )
  
imports: import json
  import os
  import pathlib
  import unittest
  import nrrd
  import numpy
  import torch
  from parameterized import parameterized
  from monailabel.transform.writer import DetectionWriter, PolygonWriter, Writer
label_desc: Use image node_id 1 for calling the TestDetectionWriter obj's underlying member method code with example usage: obj.test_slicer_result(args, input_data) without return types