code: def from_checkpoint(
      params: PredictorParams,
      checkpoint: str,
      auto_update_checkpoints=True,
  ):
      DeviceConfig(params.device)  # Device must be specified first
      ckpt = SavedCalamariModel(
          checkpoint, auto_update=auto_update_checkpoints
      )
      scenario_params = CalamariScenario.params_from_dict(ckpt.dict)
      scenario = CalamariScenario(scenario_params)
      predictor = Predictor(params, scenario.create_data())
      predictor.set_model(
          keras.models.load_model(
              ckpt.ckpt_path,
              custom_objects=CalamariScenario.model_cls().all_custom_objects(),
          )
      )
      return predictor
  
file_path: calamari/calamari_ocr/ocr/predict/predictor.py
imports: from typing import List
  from tensorflow import keras
  from tfaip.data.pipeline.processor.params import SequentialProcessorPipelineParams
  from tfaip.device.device_config import DeviceConfig
  import tfaip.imports
  from tfaip.predict.multimodelpredictor import MultiModelVoter
  from calamari_ocr.ocr.predict.params import PredictorParams
  from calamari_ocr.ocr.scenario import CalamariScenario
  from calamari_ocr.ocr.voting import VoterParams
  from calamari_ocr.ocr import SavedCalamariModel, DataParams
  from calamari_ocr.ocr.voting.adapter import CalamariMultiModelVoter
  from calamari_ocr.utils.output_to_input_transformer import OutputToInputTransformer
label_desc: Use image node_id 1 for calling the Predictor obj's underlying member method code with example usage: obj.from_checkpoint(params, checkpoint, auto_update_checkpoints) and returns: predictor