code: def test_given_linear_regression_problem_when_auto_assign_causal_models_with_good_quality_returns_linear_model():
      X, Y = _generate_linear_regression_data()
  
      causal_model = ProbabilisticCausalModel(
          nx.DiGraph(
              [
                  ("X0", "Y"),
                  ("X1", "Y"),
                  ("X2", "Y"),
                  ("X3", "Y"),
                  ("X4", "Y"),
              ]
          )
      )
      data = {"X" + str(i): X[:, i] for i in range(X.shape[1])}
      data.update({"Y": Y})
  
      assign_causal_mechanisms(
          causal_model,
          pd.DataFrame(data),
          quality=AssignmentQuality.GOOD,
      )
      assert isinstance(
          causal_model.causal_mechanism(
              "Y"
          ).prediction_model.sklearn_model,
          LinearRegression,
      ) or isinstance(
          causal_model.causal_mechanism(
              "Y"
          ).prediction_model.sklearn_model,
          Pipeline,
      )
  
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 5 for calling a global function with example usage: test_given_linear_regression_problem_when_auto_assign_causal_models_with_good_quality_returns_linear_model() without return types