def METHOD_NAME(
    sig: dict[str, t.Any]
) -> t.Callable[[ONNXArgTensorType], ext.NpNDArray]:
    elem_type = sig["elemType"]
    to_dtype = TENSORPROTO_ELEMENT_TYPE_TO_NUMPY_TYPE[elem_type]
    def _mapping(item: ONNXArgTensorType) -> ext.NpNDArray:
        if LazyType["ext.NpNDArray"]("numpy.ndarray").isinstance(item):
            item = item.astype(to_dtype, copy=False)
        elif isinstance(item, list):
            item = np.array(item).astype(to_dtype, copy=False)
        elif LazyType["ext.PdDataFrame"]("pandas.DataFrame").isinstance(item):
            item = item.to_numpy(dtype=to_dtype)
        elif LazyType["tf.Tensor"]("tensorflow.Tensor").isinstance(item):
            item = np.array(memoryview(item)).astype(to_dtype, copy=False)  # type: ignore
        elif LazyType["torch.Tensor"]("torch.Tensor").isinstance(item):
            item = item.numpy().astype(to_dtype, copy=False)
        else:
            raise TypeError(
                "`run` of ONNXRunnable only takes `numpy.ndarray`, `pd.DataFrame`, `tf.Tensor`, `torch.Tensor` or a list as input Tensor type"
            )
        return t.cast("ext.NpNDArray", item)
    return _mapping