code: def get_workload_ptb():
      """Import ptb workload from frozen protobuf
  
      Parameters
      ----------
          Nothing.
  
      Returns
      -------
      graph_def: graphdef
          graph_def is the tensorflow workload for ptb.
  
      word_to_id : dict
          English word to integer id mapping
  
      id_to_word : dict
          Integer id to English word mapping
      """
      sample_repo = "http://www.fit.vutbr.cz/~imikolov/rnnlm/"
      sample_data_file = "simple-examples.tgz"
      sample_url = sample_repo + sample_data_file
      ptb_model_file = "RNN/ptb/ptb_model_with_lstmblockcell.pb"
      # pylint: disable=import-outside-toplevel
      import tarfile
  
      file_path = download_testdata(
          sample_url, sample_data_file, module=["data", "ptb_data"]
      )
      dir_path = os.path.dirname(file_path)
      t = tarfile.open(file_path, "r")
      t.extractall(dir_path)
  
      word_to_id, id_to_word = _create_ptb_vocabulary(dir_path)
      dtype = "float32"
      shape = (1, 200)
  
      # Convert states of LSTMBlockCell to placeholder, so TVM can feed data
      state_name = [
          "Model/MultiRNNCellZeroState/LSTMBlockCellZeroState/zeros:0",
          "Model/MultiRNNCellZeroState/LSTMBlockCellZeroState/zeros_1:0",
          "Model/MultiRNNCellZeroState/LSTMBlockCellZeroState_1/zeros:0",
          "Model/MultiRNNCellZeroState/LSTMBlockCellZeroState_1/zeros_1:0",
      ]
  
      inputs_dict = {
          state_name[0]: tf_compat_v1.placeholder(
              dtype, shape, state_name[0].split(":")[0]
          ),
          state_name[1]: tf_compat_v1.placeholder(
              dtype, shape, state_name[1].split(":")[0]
          ),
          state_name[2]: tf_compat_v1.placeholder(
              dtype, shape, state_name[2].split(":")[0]
          ),
          state_name[3]: tf_compat_v1.placeholder(
              dtype, shape, state_name[3].split(":")[0]
          ),
      }
      return (
          word_to_id,
          id_to_word,
          get_workload(
              ptb_model_file,
              inputs_dict=inputs_dict,
              output="Model/Softmax",
          ),
      )
  
imports: import re
  import os.path
  import collections
  import numpy
  import tensorflow
  from tensorflow.core.framework import graph_pb2
  import tvm
  from tvm.contrib.download import download_testdata
label_desc: Use image node_id 11 for calling a global function with example usage: get_workload_ptb() and returns: word_to_id,  id_to_word,  get_workload