docs: def rcm_chip_order(machine):
      """A generator which iterates over a set of chips in a machine in
      Reverse-Cuthill-McKee order.
  
      For use as a chip ordering for the sequential placer.
      """
      # Convert the Machine description into a placement-problem-style-graph
      # where the vertices are chip coordinate tuples (x, y) and each net
      # represents the links leaving each chip. This allows us to re-use the
      # rcm_vertex_order function above to generate an RCM ordering of chips in
      # the machine.
      vertices = list(machine)
      nets = []
      for (x, y) in vertices:
          neighbours = []
          for link in Links:
              if (x, y, link) in machine:
                  dx, dy = link.to_vector()
                  neighbour = ((x + dx) % machine.width,
                               (y + dy) % machine.height)
  
                  # In principle if the link to chip is marked as working, that
                  # chip should be working. In practice this might not be the
                  # case (especially for carelessly hand-defined Machine
                  # objects).
                  if neighbour in machine:
                      neighbours.append(neighbour)
          nets.append(Net((x, y), neighbours))
  
      return rcm_vertex_order(vertices, nets)