code: def test_when_get_noise_dependent_function_then_correctly_omits_nodes():
      # Just some random data, since we are only interested in the omitted data.
      data = pd.DataFrame(
          {
              "X0": np.random.normal(0, 1, 10),
              "X1": np.random.normal(0, 1, 10),
              "X2": np.random.normal(0, 1, 10),
              "X3": np.random.normal(0, 1, 10),
              "X4": np.random.normal(0, 1, 10),
              "X5": np.random.normal(0, 1, 10),
              "X6": np.random.normal(0, 1, 10),
              "X7": np.random.normal(0, 1, 10),
          }
      )
  
      causal_model = StructuralCausalModel(
          nx.DiGraph(
              [
                  ("X0", "X1"),
                  ("X1", "X2"),
                  ("X3", "X2"),
                  ("X4", "X5"),
                  ("X6", "X5"),
              ]
          )
      )
      causal_model.graph.add_node("X7")
      assign_causal_mechanisms(causal_model, data)
  
      fit(causal_model, data)
  
      _, parent_order = get_noise_dependent_function(causal_model, "X2")
      assert set(parent_order) == {"X0", "X1", "X2", "X3"}
      assert parent_order.index("X1") > parent_order.index("X0")
      assert parent_order.index("X2") > parent_order.index("X0")
      assert parent_order.index("X2") > parent_order.index("X1")
      assert parent_order.index("X2") > parent_order.index("X3")
  
file_path: dowhy/tests/gcm/test_noise.py
imports: import networkx
  import numpy
  import pandas
  from _pytest.python_api import approx
  from flaky import flaky
  from dowhy.gcm import AdditiveNoiseModel, EmpiricalDistribution, InvertibleStructuralCausalModel, StructuralCausalModel, fit
  from dowhy.gcm._noise import compute_data_from_noise, compute_noise_from_data, get_noise_dependent_function
  from dowhy.gcm.auto import assign_causal_mechanisms
  from dowhy.gcm.causal_models import PARENTS_DURING_FIT
  from dowhy.gcm.ml import create_linear_regressor, create_linear_regressor_with_given_parameters, create_logistic_regression_classifier
  from dowhy.graph import DirectedGraph, get_ordered_predecessors
label_desc: Use image node_id 5 for calling a global function with example usage: test_when_get_noise_dependent_function_then_correctly_omits_nodes() without return types