code: def _single_upgrade(self):
      logger.info(f"Upgrading from version {self.version}")
      shutil.copyfile(
          self.json_path, self.json_path + f"_v{self.version}"
      )
      shutil.copyfile(
          self.ckpt_path + ".h5",
          self.ckpt_path + f".h5_v{self.version}",
      )
      if self.version < 2:
          raise Exception(
              f"Models of checkpoint-version lower than {self.version} are not supported anymore. "
              f"Use an older version of calamari to upgrade them to an supported version."
          )
      elif self.version == 2:
          from calamari_ocr.ocr.savedmodel.migrations.version2to5 import (
              migrate2to5,
              update_model,
          )
          import tensorflow as tf
  
          if packaging.version.parse(
              tf.__version__
          ) >= packaging.version.parse("2.5.0"):
              raise Exception(
                  "Modules of checkpoint version 2 can only be upgraded by Tensorflow version 2.4. Please downgrade "
                  "Tensorflow to 2.4.x (`pip install tensorflow~=2.4.0`) to convert the model to a newer version. "
                  "Afterwards you can upgrade Tensorflow to a newer version (`pip install -U tensorflow`) "
                  "and continue the model upgrade (if required)."
              )
  
          # Calamari 1.3 -> Calamari 2.1
          self.dict = migrate2to5(self.dict)
          update_model(self.dict, self.ckpt_path)
          self.version = 5
      elif self.version == 3 or self.version == 4:
          from calamari_ocr.ocr.savedmodel.migrations.version3_4to5 import (
              migrate3to5,
              update_model,
          )
  
          # Calamari 2.0 -> Calamari 2.1, 2.2
          if self.version == 3:
              self.dict = migrate3to5(self.dict)
          update_model(self.dict, self.ckpt_path)
          self.version = 5
  
      elif self.version == 5:
          from calamari_ocr.ocr.savedmodel.migrations.version5to6 import (
              update_model,
          )
  
          update_model(self.dict, self.ckpt_path)
          self.version = 6
  
      self._update_json_version()
  
file_path: calamari/calamari_ocr/ocr/savedmodel/saved_model.py
imports: import shutil
  import json
  import os
  import logging
  import packaging.version
  from calamari_ocr import __version__
  from calamari_ocr.utils import split_all_ext
label_desc: Use image node_id 3 for calling the SavedCalamariModel obj's underlying member method code with example usage: obj._single_upgrade() without return types