code: def pytorch_emit(
      original_framework,
      architecture_name,
      architecture_path,
      weight_path,
      test_input_path,
  ):
      from mmdnn.conversion.pytorch.pytorch_emitter import (
          PytorchEmitter,
      )
  
      # IR to code
      converted_file = (
          TestModels.tmpdir
          + original_framework
          + "_pytorch_"
          + architecture_name
          + "_converted"
      )
      converted_file = converted_file.replace(".", "_")
      emitter = PytorchEmitter((architecture_path, weight_path))
      emitter.run(
          converted_file + ".py", converted_file + ".npy", "test"
      )
      del emitter
      del PytorchEmitter
  
      # import converted model
      import torch
  
      model_converted = imp.load_source(
          "PytorchModel", converted_file + ".py"
      ).KitModel(converted_file + ".npy")
  
      model_converted.eval()
  
      original_framework = checkfrozen(original_framework)
      if "rnn" not in architecture_name:
          func = TestKit.preprocess_func[original_framework][
              architecture_name
          ]
          img = func(test_input_path)
          img = np.transpose(img, (2, 0, 1))
          img = np.expand_dims(img, 0).copy()
          input_data = torch.from_numpy(img)
          input_data = torch.autograd.Variable(
              input_data, requires_grad=False
          )
      else:
          sentence = np.load(test_input_path)
          input_data = torch.from_numpy(sentence)
          input_data = torch.autograd.Variable(
              input_data, requires_grad=False
          )
  
      predict = model_converted(input_data)
      predict = predict.data.numpy()
      converted_predict = np.squeeze(predict)
  
      del model_converted
      del sys.modules["PytorchModel"]
      del torch
      os.remove(converted_file + ".py")
      os.remove(converted_file + ".npy")
  
      return converted_predict
  
imports: from __future__ import absolute_import
  from __future__ import print_function
  import os
  import sys
  import imp
  import numpy
  from mmdnn.conversion.examples.imagenet_test import TestKit
  import utils
  from utils import *
  from datetime import datetime
label_desc: Use image node_id 14 for calling the TestModels obj's underlying member method code with example usage: obj.pytorch_emit(original_framework, architecture_name, architecture_path, weight_path, test_input_path) and returns: converted_predict