code: def test_update_categories(self):
      coco_path = "tests/data/coco_utils/terrain2_coco.json"
      source_coco_dict = load_json(coco_path)
  
      self.assertEqual(len(source_coco_dict["annotations"]), 5)
      self.assertEqual(len(source_coco_dict["images"]), 1)
      self.assertEqual(len(source_coco_dict["categories"]), 1)
      self.assertEqual(
          source_coco_dict["categories"],
          [{"id": 1, "name": "car", "supercategory": "car"}],
      )
      self.assertEqual(
          source_coco_dict["annotations"][1]["category_id"], 1
      )
  
      # update categories
      desired_name2id = {"human": 1, "car": 2, "big_vehicle": 3}
      target_coco_dict = update_categories(
          desired_name2id=desired_name2id, coco_dict=source_coco_dict
      )
  
      self.assertEqual(len(target_coco_dict["annotations"]), 5)
      self.assertEqual(len(target_coco_dict["images"]), 1)
      self.assertEqual(len(target_coco_dict["categories"]), 3)
      self.assertEqual(
          target_coco_dict["categories"],
          [
              {"id": 1, "name": "human", "supercategory": "human"},
              {"id": 2, "name": "car", "supercategory": "car"},
              {
                  "id": 3,
                  "name": "big_vehicle",
                  "supercategory": "big_vehicle",
              },
          ],
      )
      self.assertEqual(
          target_coco_dict["annotations"][1]["category_id"], 2
      )
  
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 10 for calling the TestCocoUtils obj's underlying member method code with example usage: obj.test_update_categories() without return types