code: def test_external_estimator(self, beta, num_samples, num_treatments):
      num_common_causes = 5
      data = dowhy.datasets.linear_dataset(
          beta=beta,
          num_common_causes=num_common_causes,
          num_samples=num_samples,
          num_treatments=num_treatments,
          treatment_is_binary=True,
      )
  
      model = CausalModel(
          data=data["df"],
          treatment=data["treatment_name"],
          outcome=data["outcome_name"],
          graph=data["gml_graph"],
          proceed_when_unidentifiable=True,
          test_significance=None,
      )
  
      identified_estimand = model.identify_effect(
          proceed_when_unidentifiable=True
      )
  
      estimate = model.estimate_effect(
          identified_estimand,
          method_name="backdoor.tests.causal_estimators.mock_external_estimator.PropensityScoreWeightingEstimator",
          control_value=0,
          treatment_value=1,
          target_units="ate",  # condition used for CATE
          confidence_intervals=True,
          method_params={
              "propensity_score_model": linear_model.LogisticRegression(
                  max_iter=1000
              )
          },
      )
  
      assert estimate.estimator.propensity_score_model.max_iter == 1000
  
imports: import networkx
  import pandas
  import pytest
  from flaky import flaky
  from pytest import mark
  from sklearn import linear_model
  import dowhy
  import dowhy.datasets
  from dowhy import CausalModel
  from dowhy.causal_graph import CausalGraph
  from dowhy.gcm import ProbabilisticCausalModel, StructuralCausalModel
  from dowhy.utils.graph_operations import daggity_to_dot
label_desc: Use image node_id 1 for calling the TestCausalModel obj's underlying member method code with example usage: obj.test_external_estimator(beta, num_samples, num_treatments) without return types