code: def get_workload(
      model_path, model_sub_path=None, inputs_dict=None, output=None
  ):
      """Import workload from frozen protobuf
  
      Parameters
      ----------
      model_path: str
          model_path on remote repository to download from.
  
      model_sub_path: str
          Model path in the compressed archive.
  
      Returns
      -------
      graph_def: graphdef
          graph_def is the tensorflow workload.
  
      """
  
      if model_sub_path:
          path_model = get_workload_official(model_path, model_sub_path)
      else:
          repo_base = "https://github.com/dmlc/web-data/raw/main/tensorflow/models/"
          model_url = os.path.join(repo_base, model_path)
          path_model = download_testdata(
              model_url, model_path, module="tf"
          )
  
      # Creates graph from saved graph_def.pb.
      with tf_compat_v1.gfile.FastGFile(path_model, "rb") as f:
          graph_def = tf_compat_v1.GraphDef()
          graph_def.ParseFromString(f.read())
          graph = tf_compat_v1.import_graph_def(
              graph_def, name="", input_map=inputs_dict
          )
  
      if inputs_dict is not None:
          # graph is changed so generate graph_def again
          with tf_compat_v1.Session(graph=graph) as sess:
              graph_def = AddShapesToGraphDef(sess, output)
  
      return graph_def
  
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 6 for calling a global function with example usage: get_workload(model_path, model_sub_path, inputs_dict, output) and returns: graph_def