code: def demo_model(archive_file, predictor_name):
      archive = load_archive(archive_file)
      return Predictor.from_archive(archive, predictor_name)
  
file_path: magnitude/pymagnitude/third_party/allennlp/tests/models/sniff_test.py
imports: from __future__ import absolute_import
  from __future__ import print_function
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.models.archival import load_archive
  from allennlp.predictors import Predictor
label_desc: Use image node_id 1 for calling a global function with example usage: demo_model(archive_file, predictor_name) and returns: Predictor