code: def test_torch_tensorable_types(numpy_dtype):
      """Make sure that we 'sanitize' only integer types that can not be made into torch tensors natively"""
      value = np.zeros((2, 2), dtype=numpy_dtype)
      dict_to_sanitize = {"value": value}
      _sanitize_pytorch_types(dict_to_sanitize)
  
      torchable = False
      try:
          torch.Tensor(value)
          torchable = True
      except TypeError:
          pass
  
      tensor = torch.as_tensor(dict_to_sanitize["value"])
  
      tensor_and_back = tensor.numpy()
  
      if tensor_and_back.dtype != value.dtype:
          assert tensor_and_back.dtype.itemsize > value.dtype.itemsize
          assert not torchable, (
              "_sanitize_pytorch_types modified value of type {}, but it was possible to create a "
              "Tensor directly from a value with that type".format(
                  numpy_dtype
              )
          )
  
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 7 for calling a global function with example usage: test_torch_tensorable_types(numpy_dtype) without return types