class_docstr: Causal discivery using the Causal Discovery Toolbox.
  Link: https://github.com/FenTechSolutions/CausalDiscoveryToolbox
docstr: Discover causal graph and return the graph in DOT format.
docstr_tok: ["Discover","causal","graph","and","return","the","graph","in","DOT","format","."]
code: def learn_graph(self, labels=None):
      """
      Discover causal graph and return the graph in DOT format.
  
      """
      graph = self._method.predict(self._data)
  
      # Get adjacency matrix
      self._adjacency_matrix = nx.to_numpy_array(graph)
      self._adjacency_matrix = np.asarray(self._adjacency_matrix)
  
      # If labels not provided
      if labels is not None:
          self._labels = labels
  
      self._graph_dot = adjacency_matrix_to_graph(
          self._adjacency_matrix, self._labels
      )
  
      # Obtain valid DOT format
      self._graph_dot = str_to_dot(self._graph_dot.source)
      return self._graph_dot
  
imports: from dowhy.graph_learners import GraphLearner
  from dowhy.utils.graph_operations import *
  from .None import get_library_class_object
label_desc: Use image node_id 2 for calling the CDT obj's underlying member method code with example usage: obj.learn_graph(labels) and returns: self