class_docstr: Main class for storing the causal model state.
docstr: Learn causal graph from the data. This function takes the method name as input and initializes the
  causal graph object using the learnt graph.
  
  :param self: instance of the CausalModel class (or its subclass)
  :param method_name: Exact method name of the object to be imported from the concerned library.
  :returns: an instance of the CausalGraph class initialized with the learned graph.
docstr_tok: ["Learn","causal","graph","from","the","data",".","This","function","takes","the","method","name","as","input","and","initializes","the","causal","graph","object","using","the","learnt","graph",".",":","param","self",":","instance","of","the","CausalModel","class","(","or","its","subclass",")",":","param","method_name",":","Exact","method","name","of","the","object","to","be","imported","from","the","concerned","library",".",":","returns",":","an","instance","of","the","CausalGraph","class","initialized","with","the","learned","graph","."]
code: def learn_graph(
      self, method_name="cdt.causality.graph.LiNGAM", *args, **kwargs
  ):
      """
      Learn causal graph from the data. This function takes the method name as input and initializes the
      causal graph object using the learnt graph.
  
      :param self: instance of the CausalModel class (or its subclass)
      :param method_name: Exact method name of the object to be imported from the concerned library.
      :returns: an instance of the CausalGraph class initialized with the learned graph.
      """
      # Import causal discovery class
      str_arr = method_name.split(".", maxsplit=1)
      library_name = str_arr[0]
      causal_discovery_class = (
          graph_learners.get_discovery_class_object(library_name)
      )
  
      model = causal_discovery_class(
          self._data, method_name, *args, **kwargs
      )
      graph = model.learn_graph()
  
      # Initialize causal graph object
      self.init_graph(graph=graph)
  
      return self._graph
  
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 7 for calling the CausalModel obj's underlying member method code with example usage: obj.learn_graph(method_name) and returns: self