code: def test_copy(Est):
      # check that the "copy" keyword works
      d = load_linnerud()
      X = d.data
      Y = d.target
      X_orig = X.copy()
  
      # copy=True won't modify inplace
      pls = Est(copy=True).fit(X, Y)
      assert_array_equal(X, X_orig)
  
      # copy=False will modify inplace
      with pytest.raises(AssertionError):
          Est(copy=False).fit(X, Y)
          assert_array_almost_equal(X, X_orig)
  
      if Est is PLSSVD:
          return  # PLSSVD does not support copy param in predict or transform
  
      X_orig = X.copy()
      with pytest.raises(AssertionError):
          pls.transform(X, Y, copy=False),
          assert_array_almost_equal(X, X_orig)
  
      X_orig = X.copy()
      with pytest.raises(AssertionError):
          pls.predict(X, copy=False),
          assert_array_almost_equal(X, X_orig)
  
      # Make sure copy=True gives same transform and predictions as predict=False
      assert_array_almost_equal(
          pls.transform(X, Y, copy=True),
          pls.transform(X.copy(), Y.copy(), copy=False),
      )
      assert_array_almost_equal(
          pls.predict(X, copy=True), pls.predict(X.copy(), copy=False)
      )
  
imports: import warnings
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal
  from sklearn.cross_decomposition import CCA, PLSSVD, PLSCanonical, PLSRegression
  from sklearn.cross_decomposition._pls import _center_scale_xy, _get_first_singular_vectors_power_method, _get_first_singular_vectors_svd, _svd_flip_1d
  from sklearn.datasets import load_linnerud, make_regression
  from sklearn.ensemble import VotingRegressor
  from sklearn.exceptions import ConvergenceWarning
  from sklearn.linear_model import LinearRegression
  from sklearn.utils import check_random_state
  from sklearn.utils.extmath import svd_flip
label_desc: Use image node_id 10 for calling a global function with example usage: test_copy(Est) without return types