code: def refute_placebo_treatment(
      data: pd.DataFrame,
      target_estimand: IdentifiedEstimand,
      estimate: CausalEstimate,
      treatment_names: List,
      num_simulations: int = 100,
      placebo_type: PlaceboType = PlaceboType.DEFAULT,
      random_state: Optional[Union[int, np.random.RandomState]] = None,
      show_progress_bar: bool = False,
      n_jobs: int = 1,
      verbose: int = 0,
      **_,
  ) -> CausalRefutation:
      """Refute an estimate by replacing treatment with a randomly-generated placebo variable.
  
      :param data: pd.DataFrame: Data to run the refutation
      :param target_estimand: IdentifiedEstimand: Identified estimand to run the refutation
      :param estimate: CausalEstimate: Estimate to run the refutation
      :param treatment_names: list: List of treatments
      :param num_simulations: The number of simulations to be run, which defaults to ``CausalRefuter.DEFAULT_NUM_SIMULATIONS``
      :param placebo_type: Default is to generate random values for the treatment. If placebo_type is "permute", then the original treatment values are permuted by row.
      :param random_state: The seed value to be added if we wish to repeat the same random behavior. If we want to repeat the same behavior we push the same seed in the psuedo-random generator.
      :param n_jobs: The maximum number of concurrently running jobs. If -1 all CPUs are used. If 1 is given, no parallel computing code is used at all (this is the default).
      :param verbose: The verbosity level: if non zero, progress messages are printed. Above 50, the output is sent to stdout. The frequency of the messages increases with the verbosity level. If it more than 10, all iterations are reported. The default is 0.
      """
  
      if isinstance(random_state, int):
          random_state = np.random.RandomState(random_state)
  
      # only permute is supported for iv methods
      if target_estimand.identifier_method.startswith("iv"):
          if placebo_type != PlaceboType.PERMUTE:
              logger.error(
                  "Only placebo_type=''permute'' is supported for creating placebo for instrumental variable estimation methods"
              )
              raise ValueError(
                  "Only placebo_type=''permute'' is supported for creating placebo for instrumental variable estimation methods."
              )
  
      # For IV methods, the estimating_instrument_names should also be
      # changed. Create a copy to avoid modifying original object
      if isinstance(estimate, InstrumentalVariableEstimator):
          estimate = copy.deepcopy(estimate)
          estimate.iv_instrument_name = [
              "placebo_" + s
              for s in parse_state(estimate.iv_instrument_name)
          ]
  
      # We need to change the identified estimand
      # We make a copy as a safety measure, we don't want to change the
      # original DataFrame
      identified_estimand = copy.deepcopy(target_estimand)
      identified_estimand.treatment_variable = ["placebo"]
  
      if target_estimand.identifier_method.startswith("iv"):
          identified_estimand.instrumental_variables = [
              "placebo_" + s
              for s in identified_estimand.instrumental_variables
          ]
  
      logger.info(
          "Refutation over {} simulated datasets of {} treatment".format(
              num_simulations, placebo_type
          )
      )
  
      type_dict = dict(data.dtypes)
  
      # Run refutation in parallel
      sample_estimates = Parallel(n_jobs=n_jobs, verbose=verbose)(
          delayed(_refute_once)(
              data,
              identified_estimand,
              estimate,
              treatment_names,
              type_dict,
              placebo_type,
              random_state,
          )
          for _ in tqdm(
              range(num_simulations),
              disable=not show_progress_bar,
              colour=CausalRefuter.PROGRESS_BAR_COLOR,
              desc="Refuting Estimates: ",
          )
      )
  
      sample_estimates = np.array(sample_estimates)
  
      refute = CausalRefutation(
          estimate.value,
          np.mean(sample_estimates),
          refutation_type="Refute: Use a Placebo Treatment",
      )
  
      # Note: We hardcode the estimate value to ZERO as we want to check if it falls in the distribution of the refuter
      # Ideally we should expect that ZERO should fall in the distribution of the effect estimates as we have severed any causal
      # relationship between the treatment and the outcome.
      dummy_estimator = CausalEstimate(
          data=data,
          treatment_name=estimate._treatment_name,
          outcome_name=estimate._outcome_name,
          estimate=0,
          control_value=estimate.control_value,
          treatment_value=estimate.treatment_value,
          target_estimand=estimate.target_estimand,
          realized_estimand_expr=estimate.realized_estimand_expr,
      )
  
      refute.add_significance_test_results(
          test_significance(dummy_estimator, sample_estimates)
      )
  
      return refute
  
imports: import copy
  import logging
  from enum import Enum
  from typing import Dict, List, 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_estimators.instrumental_variable_estimator import InstrumentalVariableEstimator
  from dowhy.causal_identifier.identified_estimand import IdentifiedEstimand
  from dowhy.causal_refuter import CausalRefutation, CausalRefuter, test_significance
  from dowhy.utils.api import parse_state
label_desc: Use image node_id 2 for calling a global function with example usage: refute_placebo_treatment(data, target_estimand, estimate, treatment_names, num_simulations, placebo_type, random_state, show_progress_bar, n_jobs, verbose) and returns: refute