code: def validate(
      platform,
      model_file,
      weight_file,
      input_file,
      mace_out_file,
      input_shape,
      output_shape,
      input_data_format,
      output_data_format,
      input_node,
      output_node,
      validation_threshold,
      input_data_type,
      backend,
      validation_outputs_data,
      log_file,
  ):
      if not isinstance(validation_outputs_data, list):
          if os.path.isfile(validation_outputs_data):
              validation_outputs = [validation_outputs_data]
          else:
              validation_outputs = []
      else:
          validation_outputs = validation_outputs_data
      if validation_outputs:
          validate_with_file(
              platform,
              output_node,
              output_shape,
              mace_out_file,
              validation_outputs,
              validation_threshold,
              log_file,
              output_data_format,
          )
      elif platform == Platform.TENSORFLOW:
          validate_tf_model(
              platform,
              model_file,
              input_file,
              mace_out_file,
              input_node,
              input_shape,
              input_data_format,
              output_node,
              output_shape,
              output_data_format,
              validation_threshold,
              input_data_type,
              log_file,
          )
      elif platform == Platform.PYTORCH:
          validate_pytorch_model(
              platform,
              model_file,
              input_file,
              mace_out_file,
              input_node,
              input_shape,
              input_data_format,
              output_node,
              output_shape,
              output_data_format,
              validation_threshold,
              input_data_type,
              log_file,
          )
      elif platform == Platform.CAFFE:
          validate_caffe_model(
              platform,
              model_file,
              input_file,
              mace_out_file,
              weight_file,
              input_node,
              input_shape,
              input_data_format,
              output_node,
              output_shape,
              output_data_format,
              validation_threshold,
              log_file,
          )
      elif platform == Platform.ONNX:
          validate_onnx_model(
              platform,
              model_file,
              input_file,
              mace_out_file,
              input_node,
              input_shape,
              input_data_format,
              output_node,
              output_shape,
              output_data_format,
              validation_threshold,
              input_data_type,
              backend,
              log_file,
          )
      elif platform == Platform.MEGENGINE:
          validate_megengine_model(
              platform,
              model_file,
              input_file,
              mace_out_file,
              input_node,
              input_shape,
              input_data_format,
              output_node,
              output_shape,
              output_data_format,
              validation_threshold,
              input_data_type,
              log_file,
          )
      elif platform == Platform.KERAS:
          validate_keras_model(
              platform,
              model_file,
              input_file,
              mace_out_file,
              input_node,
              input_shape,
              input_data_format,
              output_node,
              output_shape,
              output_data_format,
              validation_threshold,
              input_data_type,
              log_file,
          )
      else:
          mace_check(False, "Unsupported platform")
  
imports: import os
  import sys
  import os.path
  import numpy
  import six
  from py_proto import mace_pb2
  from utils import util
  from utils.config_parser import DataFormat
  from utils.config_parser import Platform
  from utils.util import mace_check
label_desc: Use image node_id 17 for calling a global function with example usage: validate(platform, model_file, weight_file, input_file, mace_out_file, input_shape, output_shape, input_data_format, output_data_format, input_node, output_node, validation_threshold, input_data_type, backend, validation_outputs_data, log_file) without return types