code: def get_real_out_value_shape_df(
      platform, mace_out_value, output_shape, output_data_format
  ):
      real_output_shape = output_shape
      real_output_data_format = output_data_format
      if len(output_shape) == 4:
          # These platforms use NHWC, if MACE's output is NCHW,
          # transpose the output of MACE from NCHW to NHWC.
          if (
              output_data_format == common.DataFormat.NCHW
              and platform.lower() in ["tensorflow", "keras"]
          ):
              mace_out_value = mace_out_value.reshape(
                  output_shape
              ).transpose((0, 2, 3, 1))
              real_output_shape = list(mace_out_value.shape)
              real_output_data_format = common.DataFormat.NHWC
          # These platforms use NCHW, if MACE's output is NHWC,
          # transpose the output of MACE from NHWC to NCHW.
          elif (
              output_data_format == common.DataFormat.NHWC
              and platform.lower()
              in ["pytorch", "caffe", "onnx", "megengine"]
          ):
              mace_out_value = mace_out_value.reshape(
                  output_shape
              ).transpose((0, 3, 1, 2))
              real_output_shape = list(mace_out_value.shape)
              real_output_data_format = common.DataFormat.NCHW
      return mace_out_value, 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 7 for calling a global function with example usage: get_real_out_value_shape_df(platform, mace_out_value, output_shape, output_data_format) and returns: mace_out_value,  real_output_shape,  real_output_data_format