code: def test_given_nonlinear_data_when_evaluate_marginal_expectation_then_returns_correct_marginal_expectations():
      X = np.random.normal(0, 1, (2000, 3))
      Y = (2 * X[:, 0] + X[:, 1]) ** 2 + X[:, 2]
      Y = Y.reshape(-1)
  
      X0 = X[:, 0].reshape(-1, 1)
      X1 = X[:, 1].reshape(-1, 1)
      X2 = X[:, 2].reshape(-1, 1)
      X01 = X[:, :2]
  
      model_all_features = create_hist_gradient_boost_regressor()
      model_all_features.fit(X, Y)
      model_feature_0 = create_hist_gradient_boost_regressor()
      model_feature_0.fit(X0, Y)
      model_feature_1 = create_hist_gradient_boost_regressor()
      model_feature_1.fit(X1, Y)
      model_feature_2 = create_hist_gradient_boost_regressor()
      model_feature_2.fit(X2, Y)
      model_feature_01 = create_hist_gradient_boost_regressor()
      model_feature_01.fit(X01, Y)
  
      assert np.mean(
          np.abs(
              model_feature_0.predict(X0[:100]).reshape(-1, 1)
              - marginal_expectation(
                  model_all_features.predict,
                  X,
                  X[:100],
                  [0],
                  feature_perturbation="randomize_columns_independently",
              )
          )
      ) == approx(0, abs=100)
      assert np.mean(
          np.abs(
              model_feature_1.predict(X1[:100]).reshape(-1, 1)
              - marginal_expectation(
                  model_all_features.predict,
                  X,
                  X[:100],
                  [1],
                  feature_perturbation="randomize_columns_independently",
              )
          )
      ) == approx(0, abs=100)
      assert np.mean(
          np.abs(
              model_feature_2.predict(X2[:100]).reshape(-1, 1)
              - marginal_expectation(
                  model_all_features.predict,
                  X,
                  X[:100],
                  [2],
                  feature_perturbation="randomize_columns_independently",
              )
          )
      ) == approx(0, abs=100)
      assert np.mean(
          np.abs(
              model_feature_01.predict(X01[:100]).reshape(-1, 1)
              - marginal_expectation(
                  model_all_features.predict,
                  X,
                  X[:100],
                  [0, 1],
                  feature_perturbation="randomize_columns_independently",
              )
          )
      ) == approx(0, abs=100)
  
imports: import numpy
  import pytest
  from flaky import flaky
  from numpy.matlib import repmat
  from pytest import approx
  from dowhy.gcm.ml import create_hist_gradient_boost_classifier, create_hist_gradient_boost_regressor, create_linear_regressor, create_logistic_regression_classifier
  from dowhy.gcm.stats import estimate_ftest_pvalue, marginal_expectation, quantile_based_fwer
  from dowhy.gcm.util.general import geometric_median
label_desc: Use image node_id 10 for calling a global function with example usage: test_given_nonlinear_data_when_evaluate_marginal_expectation_then_returns_correct_marginal_expectations() without return types