code: def test_able_int_type():
      # The integer type cabable of containing values
      for vals, exp_out in (
          ([0, 1], np.uint8),
          ([0, 255], np.uint8),
          ([-1, 1], np.int8),
          ([0, 256], np.uint16),
          ([-1, 128], np.int16),
          ([0.1, 1], None),
          ([0, 2**16], np.uint32),
          ([-1, 2**15], np.int32),
          ([0, 2**32], np.uint64),
          ([-1, 2**31], np.int64),
          ([-1, 2**64 - 1], None),
          ([0, 2**64 - 1], np.uint64),
          ([0, 2**64], None),
      ):
          assert able_int_type(vals) == exp_out
  
file_path: nibabel/nibabel/tests/test_casting.py
imports: import os
  from platform import machine
  import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from ..casting import CastingError, able_int_type, best_float, float_to_int, floor_log2, int_abs, longdouble_precision_improved, sctypes, shared_range, ulp
  from ..testing import suppress_warnings
label_desc: Use image node_id 6 for calling a global function with example usage: test_able_int_type() without return types