class_docstr: Class for optimized implementation of Backdoor variable search between the source nodes and the target nodes.
docstr: Obtains sets of backdoor variable to condition on for each node pair.
  
  :returns:  List of sets with each set containing backdoor variable corresponding to a given node pair.
docstr_tok: ["Obtains","sets","of","backdoor","variable","to","condition","on","for","each","node","pair",".",":","returns",":","List","of","sets","with","each","set","containing","backdoor","variable","corresponding","to","a","given","node","pair","."]
code: def get_backdoor_vars(self):
      """
      Obtains sets of backdoor variable to condition on for each node pair.
  
      :returns:  List of sets with each set containing backdoor variable corresponding to a given node pair.
      """
      undirected_graph = self._graph.to_undirected()
  
      # Get adjacency list
      adjlist = adjacency_matrix_to_adjacency_list(
          nx.to_numpy_array(undirected_graph),
          labels=list(undirected_graph.nodes),
      )
      path_dict = {}
      backdoor_sets = []  # Put in backdoor sets format
  
      for node1 in self._nodes1:
          for node2 in self._nodes2:
              if (node1, node2) in path_dict:
                  continue
              self._path_search(adjlist, node1, node2, path_dict)
              if len(path_dict) != 0:
                  obj = HittingSetAlgorithm(
                      path_dict[(node1, node2)].get_condition_vars(),
                      self._colliders,
                  )
  
                  backdoor_set = {}
                  backdoor_set["backdoor_set"] = tuple(obj.find_set())
                  backdoor_set[
                      "num_paths_blocked_by_observed_nodes"
                  ] = obj.num_sets()
                  backdoor_sets.append(backdoor_set)
  
      return backdoor_sets
  
imports: import networkx
  from dowhy.utils.graph_operations import adjacency_matrix_to_adjacency_list
label_desc: Use image node_id 2 for calling the Backdoor obj's underlying member method code with example usage: obj.get_backdoor_vars() and returns: backdoor_sets