class_docstr: Base class for a sampler from the interventional distribution.
class_docstr_tok: ["Base","class","for","a","sampler","from","the","interventional","distribution","."]
docstr: By default, this expects a sampler to be built on class initialization which contains a `sample` method.
  Override this method if you want to use a different approach to sampling.
  :return:
docstr_tok: ["By","default",",","this","expects","a","sampler","to","be","built","on","class","initialization","which","contains","a","`","sample","`","method",".","Override","this","method","if","you","want","to","use","a","different","approach","to","sampling",".",":","return",":"]
code: def sample(self):
      """
      By default, this expects a sampler to be built on class initialization which contains a `sample` method.
      Override this method if you want to use a different approach to sampling.
      :return:
      """
      sampled_outcomes = self.sampler.sample(
          self._df[
              self._treatment_names
              + self._target_estimand.get_backdoor_variables()
          ].values
      )
      sampled_outcomes = pd.DataFrame(
          sampled_outcomes, columns=self._outcome_names
      )
      self._df[self._outcome_names] = sampled_outcomes
  
file_path: dowhy/dowhy/do_sampler.py
imports: import logging
  from typing import List
  import networkx
  import numpy
  import pandas
  from dowhy import EstimandType, identify_effect_auto
  from dowhy.utils.api import parse_state
label_desc: Use image node_id 7 for calling the DoSampler obj's underlying member method code with example usage: obj.sample() without return types