class_docstr: Represents a probabilistic graphical causal model, i.e. it combines a graphical representation of causal
  causal relationships and corresponding causal mechanism for each node describing the data generation process. The
  causal mechanisms can be any general stochastic models.
class_docstr_tok: ["Represents","a","probabilistic","graphical","causal","model",",","i.e",".","it","combines","a","graphical","representation","of","causal","causal","relationships","and","corresponding","causal","mechanism","for","each","node","describing","the","data","generation","process",".","The","causal","mechanisms","can","be","any","general","stochastic","models","."]
docstr: Returns the generative causal model of node in the causal graph.
  
  :param node: Target node whose causal model is to be assigned.
  :returns: The causal mechanism for this node. A root node is of type
            :class:`~dowhy.gcm.graph.StochasticModel`, whereas a non-root node is of type
            :class:`~dowhy.gcm.graph.ConditionalStochasticModel`.
docstr_tok: ["Returns","the","generative","causal","model","of","node","in","the","causal","graph",".",":","param","node",":","Target","node","whose","causal","model","is","to","be","assigned",".",":","returns",":","The","causal","mechanism","for","this","node",".","A","root","node","is","of","type",":","class",":","`","~dowhy.gcm.graph.StochasticModel","`",",","whereas","a","non-root","node","is","of","type",":","class",":","`","~dowhy.gcm.graph.ConditionalStochasticModel","`","."]
code: def causal_mechanism(
      self, node: Any
  ) -> Union[StochasticModel, ConditionalStochasticModel]:
      """Returns the generative causal model of node in the causal graph.
  
      :param node: Target node whose causal model is to be assigned.
      :returns: The causal mechanism for this node. A root node is of type
                :class:`~dowhy.gcm.graph.StochasticModel`, whereas a non-root node is of type
                :class:`~dowhy.gcm.graph.ConditionalStochasticModel`.
      """
      return self.graph.nodes[node][CAUSAL_MECHANISM]
  
imports: from typing import Any, Callable, Optional, Union
  import networkx
  from dowhy.gcm.causal_mechanisms import ConditionalStochasticModel, FunctionalCausalModel, InvertibleFunctionalCausalModel, StochasticModel
  from dowhy.graph import DirectedGraph, HasNodes, get_ordered_predecessors, is_root_node, validate_acyclic, validate_node_in_graph
label_desc: Use image node_id 3 for calling the ProbabilisticCausalModel obj's underlying member method code with example usage: obj.causal_mechanism(node) and returns: self