code: def test_float32_aware_assert_allclose():
      # The relative tolerance for float32 inputs is 1e-4
      assert_allclose(np.array([1.0 + 2e-5], dtype=np.float32), 1.0)
      with pytest.raises(AssertionError):
          assert_allclose(np.array([1.0 + 2e-4], dtype=np.float32), 1.0)
  
      # The relative tolerance for other inputs is left to 1e-7 as in
      # the original numpy version.
      assert_allclose(np.array([1.0 + 2e-8], dtype=np.float64), 1.0)
      with pytest.raises(AssertionError):
          assert_allclose(np.array([1.0 + 2e-7], dtype=np.float64), 1.0)
  
      # atol is left to 0.0 by default, even for float32
      with pytest.raises(AssertionError):
          assert_allclose(np.array([1e-5], dtype=np.float32), 0.0)
      assert_allclose(
          np.array([1e-5], dtype=np.float32), 0.0, atol=2e-5
      )
  
imports: import atexit
  import os
  import unittest
  import warnings
  import numpy
  import pytest
  from scipy import sparse
  from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
  from sklearn.tree import DecisionTreeClassifier
  from sklearn.utils import _IS_WASM
  from sklearn.utils._testing import TempMemmap, _convert_container, _delete_folder, assert_allclose, assert_allclose_dense_sparse, assert_no_warnings, assert_raise_message, assert_raises, assert_raises_regex, assert_run_python_script_without_output, check_docstring_parameters, create_memmap_backed_data, ignore_warnings, raises, set_random_state
  from sklearn.utils.deprecation import deprecated
  from sklearn.utils.fixes import CSC_CONTAINERS, CSR_CONTAINERS, parse_version, sp_version
  from sklearn.utils.metaestimators import available_if
label_desc: Use image node_id 22 for calling a global function with example usage: test_float32_aware_assert_allclose() without return types