code: def test_given_data_with_known_noise_values_when_compute_data_from_noise_then_returns_correct_values():
      N0 = np.random.uniform(-1, 1, 1000)
      N1 = np.random.normal(0, 0.1, 1000)
      N2 = np.random.normal(0, 0.1, 1000)
      N3 = np.random.normal(0, 0.1, 1000)
  
      X0 = N0
      X1 = 2 * X0 + N1
      X2 = 0.5 * X0 + N2
      X3 = 0.5 * X2 + N3
  
      original_observations = pd.DataFrame(
          {"X0": X0, "X1": X1, "X2": X2, "X3": X3}
      )
  
      noise_observations = pd.DataFrame(
          {"X0": N0, "X1": N1, "X2": N2, "X3": N3}
      )
  
      causal_model = StructuralCausalModel(
          nx.DiGraph([("X0", "X1"), ("X0", "X2"), ("X2", "X3")])
      )
      causal_model.set_causal_mechanism("X0", EmpiricalDistribution())
      causal_model.set_causal_mechanism(
          "X1",
          AdditiveNoiseModel(
              prediction_model=create_linear_regressor_with_given_parameters(
                  np.array([2])
              )
          ),
      )
      causal_model.set_causal_mechanism(
          "X2",
          AdditiveNoiseModel(
              prediction_model=create_linear_regressor_with_given_parameters(
                  np.array([0.5])
              )
          ),
      )
      causal_model.set_causal_mechanism(
          "X3",
          AdditiveNoiseModel(
              prediction_model=create_linear_regressor_with_given_parameters(
                  np.array([0.5])
              )
          ),
      )
  
      _persist_parents(causal_model.graph)
  
      estimated_samples = compute_data_from_noise(
          causal_model, noise_observations
      )
  
      for node in original_observations:
          assert estimated_samples[node].to_numpy() == approx(
              original_observations[node].to_numpy()
          )
  
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 1 for calling a global function with example usage: test_given_data_with_known_noise_values_when_compute_data_from_noise_then_returns_correct_values() without return types