class_docstr: Runs a custom function.
class_docstr_tok: ["Runs","a","custom","function","."]
code: def _run_impl(self, impl, *inputs, **kwargs):  # type: ignore
      if len(impl.input_names) != len(inputs):
          raise RuntimeError(
              f"Mismatch lengths between the number of inputs {len(inputs)} "
              f"and the expected number of inputs {len(impl.inputs)} "
              f"for node {self.op_type!r} from domain {self.domain!r}."
          )
      feeds = dict(zip(impl.input_names, inputs))
      attributes = self.attributes_.copy()
      attributes.update(kwargs)
      results = impl.run(None, feeds, attributes=attributes)
      if len(impl.output_names) != len(results):
          raise RuntimeError(
              f"Mismatch lengths between the number of outputs {len(results)} "
              f"and the expected number of outputs {len(impl.output_names)} "
              f"for node {self.op_type!r} from domain {self.domain!r}."
          )
      return tuple(results)
  
imports: from __future__ import annotations
  import abc
  from typing import Any, ClassVar, Iterable
  import numpy
  from onnx import TensorProto
  from onnx.defs import get_all_schemas_with_history, get_schema, onnx_opset_version
  from onnx.helper import make_node, make_tensor_type_proto, np_dtype_to_tensor_dtype
  from onnx.numpy_helper import to_array, unpack_int4
  from onnx.onnx_pb import AttributeProto, GraphProto, NodeProto, TypeProto
  from onnx.reference.custom_element_types import bfloat16, float8e4m3fn, float8e4m3fnuz, float8e5m2, float8e5m2fnuz, int4, uint4
label_desc: Use image node_id 3 for calling the OpFunction obj's underlying member method code with example usage: obj._run_impl(impl) and returns: tuple