def _breadth_first_iter(loc):
    """
    Given a loctation node (from a zipper) walk it's children in breadth first
    order.
    """
    tocheck = [loc]
    while tocheck:
        l = tocheck.pop(0)
        yield l
        child = l.down()
        while child:
            tocheck.append(child)
            child = child.right()
