code: def get_model_vars(model_dir, service_config):
      serving_server_dir = os.path.join(model_dir, "serving_server")
      # rewrite model_config
      service_config["op"]["ppdet"]["local_service_conf"][
          "model_config"
      ] = serving_server_dir
      serving_server_conf = os.path.join(
          serving_server_dir, "serving_server_conf.prototxt"
      )
      with open(serving_server_conf, "r") as f:
          model_var = google.protobuf.text_format.Merge(
              str(f.read()), m_config.GeneralModelConfig()
          )
      feed_vars = [var.name for var in model_var.feed_var]
      fetch_vars = [var.name for var in model_var.fetch_var]
      return feed_vars, fetch_vars
  
imports: import copy
  from paddle_serving_server.web_service import WebService, Op
  from paddle_serving_server.proto import general_model_config_pb2
  import google.protobuf.text_format
  import os
  import numpy
  import base64
  from PIL import Image
  import io
  from preprocess_ops import Compose
  from postprocess_ops import HRNetPostProcess
  from argparse import ArgumentParser, RawDescriptionHelpFormatter
  import yaml
label_desc: Use image node_id 1 for calling a global function with example usage: get_model_vars(model_dir, service_config) and returns: feed_vars,  fetch_vars