code: def test_lda_scaling():
      # Test if classification works correctly with differently scaled features.
      n = 100
      rng = np.random.RandomState(1234)
      # use uniform distribution of features to make sure there is absolutely no
      # overlap between classes.
      x1 = rng.uniform(-1, 1, (n, 3)) + [-10, 0, 0]
      x2 = rng.uniform(-1, 1, (n, 3)) + [10, 0, 0]
      x = np.vstack((x1, x2)) * [1, 100, 10000]
      y = [-1] * n + [1] * n
  
      for solver in ("svd", "lsqr", "eigen"):
          clf = LinearDiscriminantAnalysis(solver=solver)
          # should be able to separate the data perfectly
          assert clf.fit(x, y).score(x, y) == 1.0, (
              "using covariance: %s" % solver
          )
  
imports: import numpy
  import pytest
  from scipy import linalg
  from sklearn.cluster import KMeans
  from sklearn.covariance import LedoitWolf, ShrunkCovariance, ledoit_wolf
  from sklearn.datasets import make_blobs
  from sklearn.discriminant_analysis import LinearDiscriminantAnalysis, QuadraticDiscriminantAnalysis, _cov
  from sklearn.preprocessing import StandardScaler
  from sklearn.utils import _IS_WASM, check_random_state
  from sklearn.utils._testing import _convert_container, assert_allclose, assert_almost_equal, assert_array_almost_equal, assert_array_equal
label_desc: Use image node_id 8 for calling a global function with example usage: test_lda_scaling() without return types