code: def test_loadings():
      expect = np.array(
          [
              [0.9, -0.4, -0.3, 0.0],
              [-0.5, -0.9, 0.1, -0.0],
              [1.0, -0.0, 0.1, -0.1],
              [1.0, -0.1, 0.2, 0.1],
          ]
      )
  
      pca = PCA(solver="eigen")
      pca.fit(X_std)
      assert_almost_equal(pca.loadings_, expect, decimal=1)
  
      expect = np.array(
          [
              [-0.9, -0.4, 0.3, 0.0],
              [0.4, -0.9, -0.1, -0.0],
              [-1.0, -0.0, -0.1, -0.1],
              [-1.0, -0.1, -0.2, 0.1],
          ]
      )
  
      pca = PCA(solver="svd")
      pca.fit(X_std)
      assert_almost_equal(pca.loadings_, expect, decimal=1)
  
file_path: mlxtend/mlxtend/feature_extraction/tests/test_principal_component_analysis.py
imports: import numpy
  from numpy.testing import assert_allclose, assert_almost_equal
  from mlxtend.data import iris_data
  from mlxtend.feature_extraction import PrincipalComponentAnalysis
  from mlxtend.preprocessing import standardize
  from mlxtend.utils import assert_raises
label_desc: Use image node_id 7 for calling a global function with example usage: test_loadings() without return types