class_docstr: A class to maintain the state during planarity check.
class_docstr_tok: ["A","class","to","maintain","the","state","during","planarity","check","."]
docstr: Recursive version of :meth:`lr_planarity`.
docstr_tok: ["Recursive","version","of",":","meth",":","`","lr_planarity","`","."]
code: def lr_planarity_recursive(self):
      """Recursive version of :meth:`lr_planarity`."""
      if self.G.order() > 2 and self.G.size() > 3 * self.G.order() - 6:
          # graph is not planar
          return None
  
      # orientation of the graph by depth first search traversal
      for v in self.G:
          if self.height[v] is None:
              self.height[v] = 0
              self.roots.append(v)
              self.dfs_orientation_recursive(v)
  
      # Free no longer used variable
      self.G = None
  
      # testing
      for v in self.DG:  # sort the adjacency lists by nesting depth
          # note: this sorting leads to non linear time
          self.ordered_adjs[v] = sorted(
              self.DG[v], key=lambda x: self.nesting_depth[(v, x)]
          )
      for v in self.roots:
          if not self.dfs_testing_recursive(v):
              return None
  
      for e in self.DG.edges:
          self.nesting_depth[e] = (
              self.sign_recursive(e) * self.nesting_depth[e]
          )
  
      self.embedding.add_nodes_from(self.DG.nodes)
      for v in self.DG:
          # sort the adjacency lists again
          self.ordered_adjs[v] = sorted(
              self.DG[v], key=lambda x: self.nesting_depth[(v, x)]
          )
          # initialize the embedding
          previous_node = None
          for w in self.ordered_adjs[v]:
              self.embedding.add_half_edge(v, w, ccw=previous_node)
              previous_node = w
  
      # compute the complete embedding
      for v in self.roots:
          self.dfs_embedding_recursive(v)
  
      return self.embedding
  
imports: from collections import defaultdict
  import networkx
label_desc: Use image node_id 3 for calling the LRPlanarity obj's underlying member method code with example usage: obj.lr_planarity_recursive() and returns: self, None, None