code: def validate_with_file(
      platform,
      device_type,
      output_names,
      output_shapes,
      mace_out_file,
      validation_outputs_data,
      validation_threshold,
      log_file,
      output_data_formats,
  ):
      for i in range(len(output_names)):
          if validation_outputs_data[i].startswith(
              "http://"
          ) or validation_outputs_data[i].startswith("https://"):
              validation_file_name = common.formatted_file_name(
                  mace_out_file, output_names[i] + "_validation"
              )
              six.moves.urllib.request.urlretrieve(
                  validation_outputs_data[i], validation_file_name
              )
          else:
              validation_file_name = validation_outputs_data[i]
          value = load_data(validation_file_name)
          out_shape = output_shapes[i]
          output_file_name = common.formatted_file_name(
              mace_out_file, output_names[i]
          )
          mace_out_value = load_data(output_file_name)
          (
              mace_out_value,
              real_output_shape,
              real_output_data_format,
          ) = get_real_out_value_shape_df(
              platform,
              mace_out_value,
              output_shapes[i],
              output_data_formats[i],
          )
          compare_output(
              platform,
              device_type,
              output_names[i],
              mace_out_value,
              value,
              validation_threshold,
              log_file,
              real_output_shape,
              real_output_data_format,
          )
  
imports: import argparse
  import sys
  import os
  import os.path
  import numpy
  import six
  import common
label_desc: Use image node_id 8 for calling a global function with example usage: validate_with_file(platform, device_type, output_names, output_shapes, mace_out_file, validation_outputs_data, validation_threshold, log_file, output_data_formats) without return types