code: def _load_or_init_impl(
      session, method_order, allow_drop_layers, allow_lr_init=True
  ):
      for method in method_order:
          # Load best validating checkpoint, saved in checkpoint file 'best_dev_checkpoint'
          if method == "best":
              ckpt_path = _checkpoint_path_or_none(
                  "best_dev_checkpoint"
              )
              if ckpt_path:
                  log_info(
                      "Loading best validating checkpoint from {}".format(
                          ckpt_path
                      )
                  )
                  return _load_checkpoint(
                      session,
                      ckpt_path,
                      allow_drop_layers,
                      allow_lr_init=allow_lr_init,
                  )
              log_info("Could not find best validating checkpoint.")
  
          # Load most recent checkpoint, saved in checkpoint file 'checkpoint'
          elif method == "last":
              ckpt_path = _checkpoint_path_or_none("checkpoint")
              if ckpt_path:
                  log_info(
                      "Loading most recent checkpoint from {}".format(
                          ckpt_path
                      )
                  )
                  return _load_checkpoint(
                      session,
                      ckpt_path,
                      allow_drop_layers,
                      allow_lr_init=allow_lr_init,
                  )
              log_info("Could not find most recent checkpoint.")
  
          # Initialize all variables
          elif method == "init":
              log_info("Initializing all variables.")
              return _initialize_all_variables(session)
  
          else:
              log_error(
                  "Unknown initialization method: {}".format(method)
              )
              sys.exit(1)
  
      log_error(
          "All initialization methods failed ({}).".format(method_order)
      )
      sys.exit(1)
  
file_path: DeepSpeech/training/deepspeech_training/util/checkpoints.py
imports: import sys
  import tensorflow
  import tensorflow.compat.v1
  from .flags import FLAGS
  from .logging import log_info, log_error, log_warn
label_desc: Use image node_id 4 for calling a global function with example usage: _load_or_init_impl(session, method_order, allow_drop_layers, allow_lr_init) and returns: _load_checkpoint, _load_checkpoint, _initialize_all_variables