code: def test_int_abs():
      for itype in sctypes["int"]:
          info = np.iinfo(itype)
          in_arr = np.array([info.min, info.max], dtype=itype)
          idtype = np.dtype(itype)
          udtype = np.dtype(idtype.str.replace("i", "u"))
          assert udtype.kind == "u"
          assert idtype.itemsize == udtype.itemsize
          mn, mx = in_arr
          e_mn = int(mx) + 1
          assert int_abs(mx) == mx
          assert int_abs(mn) == e_mn
          assert_array_equal(int_abs(in_arr), [e_mn, mx])
  
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 4 for calling a global function with example usage: test_int_abs() without return types