code: def test_sanitize_pytorch_types_int8():
      _TORCH_BEFORE_1_1 = version.parse(
          torch.__version__
      ) < version.parse("1.1.0")
  
      dict_to_sanitize = {"a": np.asarray([-1, 1], dtype=np.int8)}
      _sanitize_pytorch_types(dict_to_sanitize)
  
      np.testing.assert_array_equal(dict_to_sanitize["a"], [-1, 1])
      if _TORCH_BEFORE_1_1:
          assert dict_to_sanitize["a"].dtype == np.int16
      else:
          assert dict_to_sanitize["a"].dtype == np.int8
  
imports: from decimal import Decimal
  from packaging import version
  import numpy
  import pyarrow
  import pytest
  import torch
  from petastorm import make_reader, TransformSpec, make_batch_reader
  from petastorm.pytorch import _sanitize_pytorch_types, DataLoader, BatchedDataLoader, decimal_friendly_collate, InMemBatchedDataLoader, _load_rows_into_mem
  from petastorm.tests.test_common import TestSchema
label_desc: Use image node_id 5 for calling a global function with example usage: test_sanitize_pytorch_types_int8() without return types