code: def test_pca_inverse(svd_solver, whiten):
      # Test that the projection of data can be inverted
      rng = np.random.RandomState(0)
      n, p = 50, 3
      X = rng.randn(n, p)  # spherical data
      X[:, 1] *= 0.00001  # make middle component relatively small
      X += [5, 4, 3]  # make a large mean
  
      # same check that we can find the original data from the transformed
      # signal (since the data is almost of rank n_components)
      pca = PCA(
          n_components=2, svd_solver=svd_solver, whiten=whiten
      ).fit(X)
      Y = pca.transform(X)
      Y_inverse = pca.inverse_transform(Y)
      assert_allclose(X, Y_inverse, rtol=5e-6)
  
imports: import re
  import warnings
  import numpy
  import pytest
  import scipy
  from numpy.testing import assert_array_equal
  from sklearn import config_context, datasets
  from sklearn.base import clone
  from sklearn.datasets import load_iris, make_classification
  from sklearn.decomposition import PCA
  from sklearn.decomposition._pca import _assess_dimension, _infer_dimension
  from sklearn.utils._array_api import _atol_for_type, _convert_to_numpy, yield_namespace_device_dtype_combinations
  from sklearn.utils._array_api import device
  from sklearn.utils._testing import _array_api_for_tests, assert_allclose
  from sklearn.utils.estimator_checks import _get_check_estimator_ids, check_array_api_input_and_values
  from sklearn.utils.fixes import CSC_CONTAINERS, CSR_CONTAINERS
label_desc: Use image node_id 14 for calling a global function with example usage: test_pca_inverse(svd_solver, whiten) without return types