def __init__(self, distance=None): self.nodes = itertools.cycle(get_nodes()) self.distance = distance