class_docstr: Main class for storing the causal model state.
docstr: Initialize self._graph using graph provided by the user.
docstr_tok: ["Initialize","self._graph","using","graph","provided","by","the","user","."]
code: def init_graph(self, graph, identify_vars):
      """
      Initialize self._graph using graph provided by the user.
  
      """
      # Create causal graph object
      self._graph = CausalGraph(
          self._treatment,
          self._outcome,
          graph,
          effect_modifier_names=self._effect_modifiers,
          observed_node_names=self._data.columns.tolist(),
          missing_nodes_as_confounders=self._missing_nodes_as_confounders,
      )
  
      if identify_vars:
          self._common_causes = self._graph.get_common_causes(
              self._treatment, self._outcome
          )
          self._instruments = self._graph.get_instruments(
              self._treatment, self._outcome
          )
          # Sometimes, effect modifiers from the graph may not match those provided by the user.
          # (Because some effect modifiers may also be common causes)
          # In such cases, the user-provided modifiers are used.
          # If no effect modifiers are provided,  then the ones from the graph are used.
          if (
              self._effect_modifiers is None
              or not self._effect_modifiers
          ):
              self._effect_modifiers = self._graph.get_effect_modifiers(
                  self._treatment, self._outcome
              )
  
imports: import logging
  import typing
  import warnings
  from itertools import combinations
  from sympy import init_printing
  import dowhy.causal_estimators
  import dowhy.causal_refuters
  import dowhy.graph_learners
  from dowhy.causal_estimator import CausalEstimate, estimate_effect
  from dowhy.causal_graph import CausalGraph
  from dowhy.causal_identifier import AutoIdentifier, BackdoorAdjustment, IDIdentifier
  from dowhy.causal_identifier.identify_effect import EstimandType
  from dowhy.causal_refuters.graph_refuter import GraphRefuter
  from dowhy.utils.api import parse_state
label_desc: Use image node_id 3 for calling the CausalModel obj's underlying member method code with example usage: obj.init_graph(graph, identify_vars) without return types