code: def _get_exact_noise_dependent_function(
      causal_model: StructuralCausalModel, target_node: Any
  ) -> Tuple[Callable[[np.ndarray], np.ndarray], List[Any]]:
      nodes_order = list(nx.topological_sort(causal_model.graph))
  
      def predict_method(noise_samples: np.ndarray) -> np.ndarray:
          return compute_data_from_noise(
              causal_model,
              pd.DataFrame(
                  noise_samples, columns=[x for x in nodes_order]
              ),
          )[target_node].to_numpy()
  
      return predict_method, nodes_order
  
file_path: dowhy/dowhy/gcm/_noise.py
imports: from typing import Any, Callable, List, Optional, Tuple
  import networkx
  import numpy
  import pandas
  from dowhy.gcm.causal_models import InvertibleStructuralCausalModel, ProbabilisticCausalModel, StructuralCausalModel, validate_causal_dag
  from dowhy.gcm.ml.prediction_model import PredictionModel
  from dowhy.gcm.util.general import shape_into_2d
  from dowhy.graph import get_ordered_predecessors, is_root_node, node_connected_subgraph_view
label_desc: Use image node_id 4 for calling a global function with example usage: _get_exact_noise_dependent_function(causal_model, target_node) and returns: predict_method,  nodes_order, compute_data_from_noise