code: def test_givne_simple_data_when_apply_has_linear_relationship_then_returns_expected_results():
      X = np.random.random(1000)
  
      assert has_linear_relationship(X, 2 * X)
      assert not has_linear_relationship(X, X**2)
  
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 20 for calling a global function with example usage: test_givne_simple_data_when_apply_has_linear_relationship_then_returns_expected_results() without return types