code: def test_to_int32(self):
      model_id = "fxmarty/gpt2-tiny-onnx"
  
      with TemporaryDirectory() as tmpdir:
          repo_path = huggingface_hub.snapshot_download(
              model_id, cache_dir=tmpdir
          )
  
          path = str(Path(repo_path, "decoder_model.onnx"))
          save_path = str(Path(repo_path, "decoder_model_int32.onnx"))
          model = onnx.load(path)
  
          model = cast_slice_nodes_inputs_to_int32(model)
  
          onnx.save(
              model,
              save_path,
              save_as_external_data=True,
              all_tensors_to_one_file=True,
              location=Path(save_path).name + "_data",
          )
  
          onnx.checker.check_model(save_path)
  
          model = InferenceSession(
              save_path, providers=["CPUExecutionProvider"]
          )
  
          inputs = {
              "input_ids": np.array(
                  [[12, 54, 290, 314, 823, 287, 287]], dtype=np.int64
              ),
              "attention_mask": np.array(
                  [[1, 1, 1, 1, 1, 1, 1]], dtype=np.int64
              ),
          }
  
          model.run(None, inputs)
  
imports: import os
  import subprocess
  import unittest
  from pathlib import Path
  from tempfile import TemporaryDirectory
  from unittest import TestCase
  import huggingface_hub
  import numpy
  import onnx
  import torch
  from onnx import load
  from onnxruntime import InferenceSession
  from parameterized import parameterized
  from transformers import AutoModel, AutoTokenizer
  from optimum.exporters.onnx import main_export
  from optimum.onnx.graph_transformations import cast_slice_nodes_inputs_to_int32, merge_decoders, remove_duplicate_weights
label_desc: Use image node_id 1 for calling the OnnxToInt32Test obj's underlying member method code with example usage: obj.test_to_int32() without return types