code: def _refute_once(
      data: pd.DataFrame,
      target_estimand: IdentifiedEstimand,
      estimate: CausalEstimate,
      random_state: Optional[np.random.RandomState] = None,
  ):
      if random_state is None:
          new_data = data.assign(
              w_random=np.random.randn(data.shape[0])
          )
      else:
          new_data = data.assign(
              w_random=random_state.normal(size=data.shape[0])
          )
  
      new_estimator = estimate.estimator.get_new_estimator_object(
          target_estimand
      )
      new_estimator.fit(
          new_data,
          estimate.estimator._effect_modifier_names,
          **new_estimator._econml_fit_params
          if isinstance(new_estimator, Econml)
          else {},
      )
      new_effect = new_estimator.estimate_effect(
          new_data,
          control_value=estimate.control_value,
          treatment_value=estimate.treatment_value,
          target_units=estimate.estimator._target_units,
      )
      return new_effect.value
  
file_path: dowhy/dowhy/causal_refuters/random_common_cause.py
imports: import copy
  import logging
  from typing import Optional, Union
  import numpy
  import pandas
  from joblib import Parallel, delayed
  from tqdm.auto import tqdm
  from dowhy.causal_estimator import CausalEstimate
  from dowhy.causal_estimators.econml import Econml
  from dowhy.causal_identifier.identified_estimand import IdentifiedEstimand
  from dowhy.causal_refuter import CausalRefutation, CausalRefuter, test_significance
label_desc: Use image node_id 1 for calling a global function with example usage: _refute_once(data, target_estimand, estimate, random_state) and returns: new_effect