class_docstr: A class to maintain the state during planarity check.
class_docstr_tok: ["A","class","to","maintain","the","state","during","planarity","check","."]
docstr: Resolve the relative side of an edge to the absolute side.
docstr_tok: ["Resolve","the","relative","side","of","an","edge","to","the","absolute","side","."]
code: def sign(self, e):
      """Resolve the relative side of an edge to the absolute side."""
      # the recursion stack
      dfs_stack = [e]
      # dict to remember reference edges
      old_ref = defaultdict(lambda: None)
  
      while dfs_stack:
          e = dfs_stack.pop()
  
          if self.ref[e] is not None:
              dfs_stack.append(
                  e
              )  # revisit e after finishing self.ref[e]
              dfs_stack.append(self.ref[e])  # visit self.ref[e] next
              old_ref[e] = self.ref[e]  # remember value of self.ref[e]
              self.ref[e] = None
          else:
              self.side[e] *= self.side[old_ref[e]]
  
      return self.side[e]
  
imports: from collections import defaultdict
  import networkx
label_desc: Use image node_id 12 for calling the LRPlanarity obj's underlying member method code with example usage: obj.sign(e) and returns: self