code: def test_finite_range_err():
      # Test error cases
      a = np.array([[1.0, 0, 1], [2, 3, 4]]).view([("f1", "f")])
      with pytest.raises(TypeError):
          finite_range(a)
  
file_path: nibabel/nibabel/tests/test_scaling.py
imports: import warnings
  from io import BytesIO
  import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from ..casting import sctypes, type_info
  from ..testing import suppress_warnings
  from ..volumeutils import apply_read_scaling, array_from_file, array_to_file, finite_range
  from .test_volumeutils import _calculate_scale
label_desc: Use image node_id 2 for calling a global function with example usage: test_finite_range_err() without return types