code: def test_linear_sensitivity_with_confounders(
      self,
      mock_fig,
      estimator_method,
      effect_fraction_on_treatment,
      benchmark_common_causes,
      simulation_method,
  ):
      np.random.seed(100)
      data = dowhy.datasets.linear_dataset(
          beta=10,
          num_common_causes=7,
          num_samples=500,
          num_treatments=1,
          stddev_treatment_noise=10,
          stddev_outcome_noise=1,
      )
      data["df"] = data["df"].drop("W4", axis=1)
      graph_str = 'graph[directed 1node[ id "y" label "y"]node[ id "W0" label "W0"] node[ id "W1" label "W1"] node[ id "W2" label "W2"] node[ id "W3" label "W3"]  node[ id "W5" label "W5"] node[ id "W6" label "W6"]node[ id "v0" label "v0"]edge[source "v0" target "y"]edge[ source "W0" target "v0"] edge[ source "W1" target "v0"] edge[ source "W2" target "v0"] edge[ source "W3" target "v0"] edge[ source "W5" target "v0"] edge[ source "W6" target "v0"]edge[ source "W0" target "y"] edge[ source "W1" target "y"] edge[ source "W2" target "y"] edge[ source "W3" target "y"] edge[ source "W5" target "y"] edge[ source "W6" target "y"]]'
      model = CausalModel(
          data=data["df"],
          treatment=data["treatment_name"],
          outcome=data["outcome_name"],
          graph=graph_str,
          test_significance=None,
      )
      target_estimand = model.identify_effect(
          proceed_when_unidentifiable=True
      )
      estimate = model.estimate_effect(
          target_estimand, method_name=estimator_method
      )
      ate_estimate = data["ate"]
      refute = model.refute_estimate(
          target_estimand,
          estimate,
          method_name="add_unobserved_common_cause",
          simulation_method=simulation_method,
          benchmark_common_causes=benchmark_common_causes,
          effect_fraction_on_treatment=effect_fraction_on_treatment,
      )
      if refute.confounder_increases_estimate == True:
          bias_adjusted_estimate = refute.benchmarking_results[
              "bias_adjusted_estimate"
          ]
          assert all(
              estimate <= refute.estimate
              for estimate in bias_adjusted_estimate
          )  # if confounder_increases_estimate is True, adjusted estimate should be lower than original estimate
      else:
          bias_adjusted_estimate = refute.benchmarking_results[
              "bias_adjusted_estimate"
          ]
          assert all(
              estimate >= refute.estimate
              for estimate in bias_adjusted_estimate
          )
  
      # check if all partial R^2 values are between 0 and 1
      assert all(
          (val >= 0 and val <= 1)
          for val in refute.benchmarking_results["r2tu_w"]
      )
      assert all(
          (val >= 0 and val <= 1)
          for val in refute.benchmarking_results["r2yu_tw"]
      )
      assert refute.stats["r2yt_w"] >= 0 and refute.stats["r2yt_w"] <= 1
  
      assert (
          refute.stats["robustness_value"] >= 0
          and refute.stats["robustness_value"] <= 1
      )
      assert mock_fig.call_count > 0
  
imports: from unittest.mock import patch
  import numpy
  import pytest
  import statsmodels.api
  from pytest import mark
  from sklearn.ensemble import GradientBoostingRegressor
  import dowhy.datasets
  from dowhy import CausalModel
  from dowhy.causal_refuters.evalue_sensitivity_analyzer import EValueSensitivityAnalyzer
  from .base import SimpleRefuter
label_desc: Use image node_id 6 for calling the TestAddUnobservedCommonCauseRefuter obj's underlying member method code with example usage: obj.test_linear_sensitivity_with_confounders(mock_fig, estimator_method, effect_fraction_on_treatment, benchmark_common_causes, simulation_method) without return types