code: def format_ring_double_bond(mol):
      
      mol.require("Topology")
      mol.require("ScaleAndCenter")
      for r in sorted(mol.rings, key=len, reverse=True):
          vertices = [mol.atom(n).coords for n in r]
          try:
              if geometry.is_clockwise(vertices):
                  cpath = iterator.consecutive(itertools.cycle(r), 2)
              else:
                  cpath = iterator.consecutive(itertools.cycle(reversed(r)), 2)
          except ValueError:
              continue
          for _ in r:
              u, v = next(cpath)
              b = mol.bond(u, v)
              if b.order == 2:
                  b.type = int((u > v) == b.is_lower_first)
docs: Set double bonds around the ring.