code: def test_given_nonlinear_gaussian_data_when_fit_scm_with_auto_assigned_models_with_default_parameters_then_generate_samples_with_correct_statistics():
      X0 = np.random.normal(0, 1, 2000)
      X1 = np.sin(2 * X0) + np.random.normal(0, 0.2, 2000)
      X2 = 0.5 * X0**2 + np.random.normal(0, 0.2, 2000)
      X3 = 0.5 * X2 + np.random.normal(0, 0.2, 2000)
  
      original_observations = pd.DataFrame(
          {"X0": X0, "X1": X1, "X2": X2, "X3": X3}
      )
  
      causal_model = ProbabilisticCausalModel(
          nx.DiGraph([("X0", "X1"), ("X0", "X2"), ("X2", "X3")])
      )
  
      assign_causal_mechanisms(causal_model, original_observations)
  
      fit(causal_model, original_observations)
      generated_samples = draw_samples(causal_model, 2000)
  
      assert np.mean(generated_samples["X0"]) == approx(
          np.mean(X0), abs=0.1
      )
      assert np.std(generated_samples["X0"]) == approx(
          np.std(X0), abs=0.1
      )
      assert np.mean(generated_samples["X1"]) == approx(
          np.mean(X1), abs=0.1
      )
      assert np.std(generated_samples["X1"]) == approx(
          np.std(X1), abs=0.1
      )
      assert np.mean(generated_samples["X2"]) == approx(
          np.mean(X2), abs=0.1
      )
      assert np.std(generated_samples["X2"]) == approx(
          np.std(X2), abs=0.1
      )
      assert np.mean(generated_samples["X3"]) == approx(
          np.mean(X3), abs=0.1
      )
      assert np.std(generated_samples["X3"]) == approx(
          np.std(X3), abs=0.1
      )
  
imports: import networkx
  import numpy
  import pandas
  import pytest
  from _pytest.python_api import approx
  from flaky import flaky
  from pytest import mark
  from sklearn.ensemble import HistGradientBoostingClassifier, HistGradientBoostingRegressor
  from sklearn.linear_model import ElasticNetCV, LassoCV, LinearRegression, LogisticRegression, RidgeCV
  from sklearn.naive_bayes import GaussianNB
  from sklearn.pipeline import Pipeline
  from dowhy.gcm import AdditiveNoiseModel, DiscreteAdditiveNoiseModel, EmpiricalDistribution, ProbabilisticCausalModel, StructuralCausalModel, draw_samples, fit
  from dowhy.gcm.auto import AssignmentQuality, assign_causal_mechanisms, has_linear_relationship
label_desc: Use image node_id 19 for calling a global function with example usage: test_given_nonlinear_gaussian_data_when_fit_scm_with_auto_assigned_models_with_default_parameters_then_generate_samples_with_correct_statistics() without return types