code: def get_model_vars(client_config_dir):
      # read original serving_client_conf.prototxt
      client_config_file = os.path.join(
          client_config_dir, "serving_client_conf.prototxt"
      )
      with open(client_config_file, "r") as f:
          model_var = google.protobuf.text_format.Merge(
              str(f.read()), m_config.GeneralModelConfig()
          )
      # modify feed_var to run core/general-server/op/
      [model_var.feed_var.pop() for _ in range(len(model_var.feed_var))]
      feed_var = m_config.FeedVar()
      feed_var.name = "input"
      feed_var.alias_name = "input"
      feed_var.is_lod_tensor = False
      feed_var.feed_type = 20
      feed_var.shape.extend([1])
      model_var.feed_var.extend([feed_var])
      with open(
          os.path.join(
              client_config_dir, "serving_client_conf_cpp.prototxt"
          ),
          "w",
      ) as f:
          f.write(str(model_var))
      # get feed_vars/fetch_vars
      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
  
file_path: PaddleDetection/deploy/serving/cpp/serving_client.py
imports: import os
  import glob
  import base64
  import argparse
  from paddle_serving_client import Client
  from paddle_serving_client.proto import general_model_config_pb2
  import google.protobuf.text_format
label_desc: Use image node_id 3 for calling a global function with example usage: get_model_vars(client_config_dir) and returns: feed_vars,  fetch_vars