code: def validate_data(model_config):
      """
      Validate data in model config, we should check empty value recieved from front end.
      The easiest way to handle it is to drop empty value.
      Args:
          model_config: model config to be saved in config file
      Return:
          model config after filtering.
      """
      model_config_filtered = {}
      for key, value in model_config.items():
          if value:
              model_config_filtered[key] = value
      return model_config_filtered
  
imports: import copy
  import json
  import os
  import random
  import re
  import signal
  import string
  from collections import defaultdict
  from subprocess import Popen
  from subprocess import STDOUT
  import google.protobuf.json_format
  import google.protobuf.text_format
  import psutil
  import requests
  from .proto.model_config_pb2 import ModelConfig
  from visualdl.utils.dir import FASTDEPLOYSERVER_PATH
label_desc: Use image node_id 3 for calling a global function with example usage: validate_data(model_config) and returns: model_config_filtered