code: def test_coco_merge(self):
      from sahi.utils.coco import Coco
  
      # load coco files to be combined
      coco_path1 = "tests/data/coco_utils/terrain1_coco.json"
      coco_path2 = "tests/data/coco_utils/terrain2_coco.json"
      coco_path3 = "tests/data/coco_utils/terrain3_coco.json"
      image_dir = "tests/data/coco_utils/"
      coco1 = Coco.from_coco_dict_or_path(
          coco_path1, image_dir=image_dir
      )
      coco2 = Coco.from_coco_dict_or_path(
          coco_path2, image_dir=image_dir
      )
      coco3 = Coco.from_coco_dict_or_path(
          coco_path3, image_dir=image_dir
      )
      coco1.merge(coco2)
      coco1.merge(coco3)
      self.assertEqual(len(coco1.json["images"]), 3)
      self.assertEqual(len(coco1.json["annotations"]), 22)
      self.assertEqual(len(coco1.json["categories"]), 2)
      self.assertEqual(len(coco1.images), 3)
  
      self.assertEqual(
          coco1.json["annotations"][12]["id"],
          13,
      )
      self.assertEqual(
          coco1.json["annotations"][12]["image_id"],
          3,
      )
      self.assertEqual(
          coco1.json["annotations"][9]["category_id"],
          1,
      )
      self.assertEqual(
          coco1.json["annotations"][9]["image_id"],
          2,
      )
      self.assertEqual(
          coco1.image_dir,
          image_dir,
      )
      self.assertEqual(
          coco2.image_dir,
          image_dir,
      )
      self.assertEqual(coco2.stats["num_images"], len(coco2.images))
      self.assertEqual(
          coco2.stats["num_annotations"], len(coco2.json["annotations"])
      )
  
imports: import os
  import shutil
  import unittest
  from sahi.utils.coco import merge, update_categories
  from sahi.utils.file import load_json
label_desc: Use image node_id 15 for calling the TestCocoUtils obj's underlying member method code with example usage: obj.test_coco_merge() without return types