code: def test_given_imbalanced_categorical_data_when_calling_has_linear_relationship_then_does_not_raise_exception():
      X = np.random.normal(0, 1, 1000)
      Y = np.array(["OneClass"] * 1000)
  
      assert has_linear_relationship(
          np.append(X, 0), np.append(Y, "RareClass")
      )
  
      X = np.random.normal(0, 1, 100000)
      Y = np.array(["OneClass"] * 100000)
  
      assert has_linear_relationship(
          np.append(X, np.random.normal(0, 0.000001, 100)),
          np.append(Y, np.array(["RareClass"] * 100)),
      )
  
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 22 for calling a global function with example usage: test_given_imbalanced_categorical_data_when_calling_has_linear_relationship_then_does_not_raise_exception() without return types