class_docstr: Wrapper class for estimators from the EconML library.
  
  Supports additional parameters as listed below. For init and fit
  parameters of each estimator, refer to the EconML docs.
docstr: Fits the estimator with data for effect estimation
  :param data: data frame containing the data
  :param treatment: name of the treatment variable
  :param outcome: name of the outcome variable
  :param effect_modifiers: Variables on which to compute separate
              effects, or return a heterogeneous effect function. Not all
              methods support this currently.
docstr_tok: ["Fits","the","estimator","with","data","for","effect","estimation",":","param","data",":","data","frame","containing","the","data",":","param","treatment",":","name","of","the","treatment","variable",":","param","outcome",":","name","of","the","outcome","variable",":","param","effect_modifiers",":","Variables","on","which","to","compute","separate","effects",",","or","return","a","heterogeneous","effect","function",".","Not","all","methods","support","this","currently","."]
code: def fit(
      self,
      data: pd.DataFrame,
      effect_modifier_names: Optional[List[str]] = None,
      **kwargs,
  ):
      """
      Fits the estimator with data for effect estimation
      :param data: data frame containing the data
      :param treatment: name of the treatment variable
      :param outcome: name of the outcome variable
      :param effect_modifiers: Variables on which to compute separate
                  effects, or return a heterogeneous effect function. Not all
                  methods support this currently.
      """
      self._set_effect_modifiers(data, effect_modifier_names)
      # Save parameters for later refutter fitting
      self._econml_fit_params = kwargs
  
      self._observed_common_causes_names = (
          self._target_estimand.get_backdoor_variables().copy()
      )
  
      # Enforcing this ordering is necessary to feed through the propensity values from dataset
      self._observed_common_causes_names = [
          c
          for c in self._observed_common_causes_names
          if "propensity" not in c
      ] + sorted(
          [
              c
              for c in self._observed_common_causes_names
              if "propensity" in c
          ]
      )
  
      # For metalearners only--issue a warning if w contains variables not in x
      if self.estimator.__module__.endswith("metalearners"):
          effect_modifier_names = []
          if self._effect_modifier_names is not None:
              effect_modifier_names = self._effect_modifier_names.copy()
          w_diff_x = [
              w
              for w in self._observed_common_causes_names
              if w not in effect_modifier_names
          ]
          if len(w_diff_x) > 0:
              self.logger.warn(
                  "Concatenating common_causes and effect_modifiers and providing a single list of variables to metalearner estimator method, "
                  + self.estimator.__class__.__name__
                  + ". EconML metalearners accept a single X argument."
              )
              effect_modifier_names.extend(w_diff_x)
              # Override the effect_modifiers set in CausalEstimator.__init__()
              # Also only update self._effect_modifiers, and create a copy of self._effect_modifier_names
              # the latter can be used by other estimator methods later
              self._effect_modifiers = data[effect_modifier_names]
              self._effect_modifiers = pd.get_dummies(
                  self._effect_modifiers, drop_first=True
              )
              self._effect_modifier_names = effect_modifier_names
          self.logger.debug(
              "Effect modifiers: " + ",".join(effect_modifier_names)
          )
      if self._observed_common_causes_names:
          self._observed_common_causes = data[
              self._observed_common_causes_names
          ]
          self._observed_common_causes = pd.get_dummies(
              self._observed_common_causes, drop_first=True
          )
      else:
          self._observed_common_causes = None
      self.logger.debug(
          "Back-door variables used:"
          + ",".join(self._observed_common_causes_names)
      )
      # Instrumental variables names, if present
      # choosing the instrumental variable to use
      if getattr(self, "iv_instrument_name", None) is None:
          self.estimating_instrument_names = (
              self._target_estimand.instrumental_variables
          )
      else:
          self.estimating_instrument_names = parse_state(
              self.iv_instrument_name
          )
      if self.estimating_instrument_names:
          self._estimating_instruments = data[
              self.estimating_instrument_names
          ]
          self._estimating_instruments = pd.get_dummies(
              self._estimating_instruments, drop_first=True
          )
      else:
          self._estimating_instruments = None
  
      self.symbolic_estimator = self.construct_symbolic_estimator(
          self._target_estimand
      )
      self.logger.info(self.symbolic_estimator)
  
      X = None
      W = None  # common causes/ confounders
      Z = None  # Instruments
      Y = data[self._target_estimand.outcome_variable[0]]
      T = data[self._target_estimand.treatment_variable]
      if (
          self._effect_modifiers is not None
          and len(self._effect_modifiers) > 0
      ):
          X = self._effect_modifiers
      if self._observed_common_causes_names:
          W = self._observed_common_causes
      if self.estimating_instrument_names:
          Z = self._estimating_instruments
      named_data_args = {"Y": Y, "T": T, "X": X, "W": W, "Z": Z}
      # Calling the econml estimator's fit method
      estimator_argspec = inspect.getfullargspec(
          inspect.unwrap(self.estimator.fit)
      )
      # As of v0.9, econml has some kewyord only arguments
      estimator_named_args = (
          estimator_argspec.args + estimator_argspec.kwonlyargs
      )
      estimator_data_args = {
          arg: named_data_args[arg]
          for arg in named_data_args.keys()
          if arg in estimator_named_args
      }
      self.estimator.fit(**estimator_data_args, **kwargs)
  
      return self
  
imports: import inspect
  from importlib import import_module
  from typing import Any, Callable, List, Optional, Protocol, Union
  from warnings import warn
  import numpy
  import pandas
  from numpy.distutils.misc_util import is_sequence
  from dowhy.causal_estimator import CausalEstimate, CausalEstimator
  from dowhy.causal_identifier import IdentifiedEstimand
  from dowhy.utils.api import parse_state
label_desc: Use image node_id 2 for calling the Econml obj's underlying member method code with example usage: obj.fit(data, effect_modifier_names) and returns: self