code: def _persist_parents(graph: DirectedGraph):
      for node in graph.nodes:
          graph.nodes[node][
              PARENTS_DURING_FIT
          ] = get_ordered_predecessors(graph, node)
  
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 8 for calling a global function with example usage: _persist_parents(graph) without return types