code: def test_int64_inputs():
      import torch
  
      num_tokens = 3
      embedding_size = 5
  
      class TestModule(torch.nn.Module):
          def __init__(self):
              super(TestModule, self).__init__()
              self.embedding = torch.nn.Embedding(
                  num_tokens, embedding_size
              )
  
          def forward(self, x):
              return self.embedding(x)
  
      model = TestModule()
      model.eval()
  
      example_input = torch.randint(
          high=num_tokens, size=(2,), dtype=torch.int64
      )
      traced_model = torch.jit.trace(model, example_input)
      mlmodel = ct.convert(
          traced_model,
          inputs=[
              ct.TensorType(
                  name="input",
                  shape=example_input.shape,
                  dtype=example_input.numpy().dtype,
              )
          ],
      )
  
      # running predict() is supported on macOS
      if ct.utils._is_macos():
          result = mlmodel.predict(
              {
                  "input": example_input.detach()
                  .numpy()
                  .astype(np.float32)
              }
          )
  
          # Verify outputs
          expected = model(example_input)
          np.testing.assert_allclose(
              result["5"], expected.detach().numpy()
          )
  
      # Duplicated inputs are invalid
      with pytest.raises(ValueError, match=r"Duplicated inputs"):
          mlmodel = ct.convert(
              traced_model,
              inputs=[
                  ct.TensorType(
                      name="input",
                      shape=example_input.shape,
                      dtype=example_input.numpy().dtype,
                  ),
                  ct.TensorType(
                      name="input",
                      shape=example_input.shape,
                      dtype=example_input.numpy().dtype,
                  ),
              ],
          )
  
      # Outputs must not be specified for PyTorch
      with pytest.raises(
          ValueError, match=r"outputs must not be specified"
      ):
          mlmodel = ct.convert(
              traced_model,
              inputs=[
                  ct.TensorType(
                      name="input",
                      shape=example_input.shape,
                      dtype=example_input.numpy().dtype,
                  ),
              ],
              outputs=["output"],
          )
  
imports: from os import getcwd, chdir
  from shutil import rmtree
  from os.path import exists
  from tempfile import mkdtemp
  import pytest
  import numpy
  import coremltools
  import os
  from coremltools._deps import _HAS_TF_1, _HAS_TF_2, _HAS_TORCH, MSG_TF1_NOT_FOUND, MSG_TF2_NOT_FOUND, MSG_TORCH_NOT_FOUND
label_desc: Use image node_id 2 for calling the TestPyTorchConverterExamples obj's underlying member method code with example usage: obj.test_int64_inputs() and returns: self