code: def test_subgraph_exe3(sym, subgraph_backend, op_names):
      """Use the partitioned sym to bind an executor and compare the outputs
      with those of the original executor"""
      sym, _, _ = sym
      out = SymbolHandle()
      check_call(
          _LIB.MXBuildSubgraphByOpNames(
              sym.handle,
              c_str(subgraph_backend),
              mx_uint(len(op_names)),
              c_str_array(op_names),
              ctypes.byref(out),
          )
      )
  
      partitioned_sym = Symbol(out)
      input_names = sym.list_inputs()
      arg_names = sym.list_arguments()
      aux_names = sym.list_auxiliary_states()
      assert partitioned_sym.list_inputs() == input_names
      assert partitioned_sym.list_arguments() == arg_names
      assert partitioned_sym.list_auxiliary_states() == aux_names
      arg_shapes, _, aux_shapes = sym.infer_shape()
      arg_array = [
          mx.nd.random.uniform(shape=shape) for shape in arg_shapes
      ]
      aux_array = [
          mx.nd.random.uniform(shape=shape) for shape in aux_shapes
      ]
      exe = sym._bind(
          ctx=mx.current_context(),
          args=arg_array,
          aux_states=aux_array,
          grad_req="null",
      )
      partitioned_exe = partitioned_sym._bind(
          ctx=mx.current_context(),
          args=arg_array,
          aux_states=aux_array,
          grad_req="null",
      )
      exe.forward()
      partitioned_exe.forward()
      assert len(exe.outputs) == len(partitioned_exe.outputs)
      for i in range(len(exe.outputs)):
          assert_almost_equal(
              (exe.outputs[i] - partitioned_exe.outputs[i])
              .abs()
              .sum()
              .asnumpy(),
              onp.zeros(shape=(1,)),
          )
  
imports: import os
  import sys
  import ctypes
  import mxnet
  from mxnet.base import SymbolHandle, check_call, _LIB, mx_uint, c_str_array, c_str, mx_real_t
  from mxnet.symbol import Symbol
  import numpy
  from mxnet.test_utils import assert_almost_equal, environment
  from mxnet import gluon
  from mxnet.gluon import nn
  from mxnet import nd, npx
  import pytest
  import tempfile
label_desc: Use image node_id 12 for calling a global function with example usage: test_subgraph_exe3(sym, subgraph_backend, op_names) without return types