class_docstr: Implements methods for finding optimal (efficient) backdoor sets.
class_docstr_tok: ["Implements","methods","for","finding","optimal","(","efficient",")","backdoor","sets","."]
docstr: Method to compute the set of all vertices that lie in a causal path
   between treatment and outcome.
  
  :returns causal_vertices: set
      A set with vertices lying on some causal path between treatment and
      outcome.
docstr_tok: ["Method","to","compute","the","set","of","all","vertices","that","lie","in","a","causal","path","between","treatment","and","outcome",".",":","returns","causal_vertices",":","set","A","set","with","vertices","lying","on","some","causal","path","between","treatment","and","outcome","."]
code: def causal_vertices(self):
      """Method to compute the set of all vertices that lie in a causal path
       between treatment and outcome.
  
      :returns causal_vertices: set
          A set with vertices lying on some causal path between treatment and
          outcome.
      """
      causal_vertices = set()
      causal_paths = list(
          nx.all_simple_paths(
              self.graph,
              source=self.treatment_name,
              target=self.outcome_name,
          )
      )
  
      for path in causal_paths:
          causal_vertices = causal_vertices.union(set(path))
  
      causal_vertices.remove(self.treatment_name)
  
      return causal_vertices
  
file_path: dowhy/dowhy/causal_identifier/efficient_backdoor.py
imports: from typing import List
  import networkx
  import numpy
label_desc: Use image node_id 4 for calling the EfficientBackdoor obj's underlying member method code with example usage: obj.causal_vertices() and returns: causal_vertices