class_docstr: Base class for an estimator of causal effect.
  
  Subclasses implement different estimation methods. All estimation methods are in the package "dowhy.causal_estimators"
class_docstr_tok: ["Base","class","for","an","estimator","of","causal","effect",".","Subclasses","implement","different","estimation","methods",".","All","estimation","methods","are","in","the","package","``","dowhy.causal_estimators","''"]
docstr: Sets the effect modifiers for the estimator
  Modifies need_conditional_estimates accordingly to effect modifiers value
  :param effect_modifiers: Variables on which to compute separate
      effects, or return a heterogeneous effect function. Not all
      methods support this currently.
code: def _set_effect_modifiers(
      self,
      data: pd.DataFrame,
      effect_modifier_names: Optional[List[str]] = None,
  ):
      """Sets the effect modifiers for the estimator
      Modifies need_conditional_estimates accordingly to effect modifiers value
      :param effect_modifiers: Variables on which to compute separate
          effects, or return a heterogeneous effect function. Not all
          methods support this currently.
      """
      self._effect_modifiers = effect_modifier_names
      if effect_modifier_names is not None:
          self._effect_modifier_names = [
              cname
              for cname in effect_modifier_names
              if cname in data.columns
          ]
          if len(self._effect_modifier_names) > 0:
              self._effect_modifiers = data[self._effect_modifier_names]
              self._effect_modifiers = pd.get_dummies(
                  self._effect_modifiers, drop_first=True
              )
              self.logger.debug(
                  "Effect modifiers: "
                  + ",".join(self._effect_modifier_names)
              )
          else:
              self._effect_modifier_names = []
      else:
          self._effect_modifier_names = []
  
      self.need_conditional_estimates = (
          self.need_conditional_estimates
          if self.need_conditional_estimates != "auto"
          else (
              self._effect_modifier_names
              and len(self._effect_modifier_names) > 0
          )
      )
  
imports: import copy
  import logging
  from collections import namedtuple
  from typing import Dict, List, Optional, Union
  import numpy
  import pandas
  import sympy
  from sklearn.utils import resample
  import dowhy.interpreters
  from dowhy.causal_identifier.identified_estimand import IdentifiedEstimand
  from dowhy.utils.api import parse_state
label_desc: Use image node_id 2 for calling the CausalEstimator obj's underlying member method code with example usage: obj._set_effect_modifiers(data, effect_modifier_names) without return types