code: def test_given_continuous_and_discrete_data_when_auto_assign_then_correct_assigns_discrete_anm():
      causal_model = ProbabilisticCausalModel(
          nx.DiGraph([("X", "Y"), ("Y", "Z")])
      )
      data = {
          "X": np.random.normal(0, 1, 100),
          "Y": np.random.choice(2, 100, replace=True),
          "Z": np.random.normal(0, 1, 100),
      }
  
      assign_causal_mechanisms(
          causal_model,
          pd.DataFrame(data),
          quality=AssignmentQuality.GOOD,
      )
      assert isinstance(
          causal_model.causal_mechanism("X"), EmpiricalDistribution
      )
      assert isinstance(
          causal_model.causal_mechanism("Y"), DiscreteAdditiveNoiseModel
      )
      assert isinstance(
          causal_model.causal_mechanism("Z"), AdditiveNoiseModel
      )
  
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 15 for calling a global function with example usage: test_given_continuous_and_discrete_data_when_auto_assign_then_correct_assigns_discrete_anm() without return types