class_docstr: A class to maintain the state during planarity check.
class_docstr_tok: ["A","class","to","maintain","the","state","during","planarity","check","."]
code: def remove_back_edges(self, e):
      u = e[0]
      # trim back edges ending at parent u
      # drop entire conflict pairs
      while (
          self.S and top_of_stack(self.S).lowest(self) == self.height[u]
      ):
          P = self.S.pop()
          if P.left.low is not None:
              self.side[P.left.low] = -1
  
      if self.S:  # one more conflict pair to consider
          P = self.S.pop()
          # trim left interval
          while P.left.high is not None and P.left.high[1] == u:
              P.left.high = self.ref[P.left.high]
          if P.left.high is None and P.left.low is not None:
              # just emptied
              self.ref[P.left.low] = P.right.low
              self.side[P.left.low] = -1
              P.left.low = None
          # trim right interval
          while P.right.high is not None and P.right.high[1] == u:
              P.right.high = self.ref[P.right.high]
          if P.right.high is None and P.right.low is not None:
              # just emptied
              self.ref[P.right.low] = P.left.low
              self.side[P.right.low] = -1
              P.right.low = None
          self.S.append(P)
  
      # side of e is side of a highest return edge
      if self.lowpt[e] < self.height[u]:  # e has return edge
          hl = top_of_stack(self.S).left.high
          hr = top_of_stack(self.S).right.high
  
          if hl is not None and (
              hr is None or self.lowpt[hl] > self.lowpt[hr]
          ):
              self.ref[e] = hl
          else:
              self.ref[e] = hr
  
imports: from collections import defaultdict
  import networkx
label_desc: Use image node_id 9 for calling the LRPlanarity obj's underlying member method code with example usage: obj.remove_back_edges(e) without return types