docstr: Applies category remapping based on mapping given in self.category_remapping
docstr_tok: ["Applies","category","remapping","based","on","mapping","given","in","self.category_remapping"]
code: def _apply_category_remapping(self):
      """
      Applies category remapping based on mapping given in self.category_remapping
      """
      # confirm self.category_remapping is not None
      if self.category_remapping is None:
          raise ValueError("self.category_remapping cannot be None")
      # remap categories
      for (
          object_prediction_list
      ) in self._object_prediction_list_per_image:
          for object_prediction in object_prediction_list:
              old_category_id_str = str(object_prediction.category.id)
              new_category_id_int = self.category_remapping[
                  old_category_id_str
              ]
              object_prediction.category.id = new_category_id_int
  
file_path: sahi/sahi/models/base.py
imports: from typing import Any, Dict, List, Optional, Tuple, Union
  import numpy
  from sahi.utils.import_utils import is_available
  from sahi.utils.torch import select_device
label_desc: Use image node_id 9 for calling the DetectionModel obj's underlying member method code with example usage: obj._apply_category_remapping() without return types