code: def _run_case(
      schema: OpSchema,
      input_names: List[str],
      output_names: List[str],
      input_types: Dict[str, TypeProto],
      input_data: Optional[Dict[str, np.ndarray]] = None,
  ) -> Dict[str, TypeProto]:
      if input_data is None:
          input_data = {}
      return infer_node_outputs(
          schema,
          make_node(
              schema.name,
              input_names,
              output_names,
              domain=schema.domain,
          ),
          input_types,
          {key: from_array(arr) for key, arr in input_data.items()},
      )
  
file_path: onnx/onnx/test/inference_function_test.py
imports: import unittest
  from typing import Dict, List, Optional, Tuple, Union
  import numpy
  import onnx
  from onnx import TensorProto, TypeProto
  from onnx.checker import ValidationError
  from onnx.defs import OpSchema, get_all_schemas_with_history, get_schema
  from onnx.helper import make_graph, make_node, make_opsetid, make_tensor_type_proto, make_tensor_value_info
  from onnx.numpy_helper import from_array
  from onnx.shape_inference import InferenceError, infer_node_outputs
label_desc: Use image node_id 2 for calling a global function with example usage: _run_case(schema, input_names, output_names, input_types, input_data) and returns: infer_node_outputs