def METHOD_NAME(master, ng, existing, upcoming, max_nodes_to_break, broken_ips, verbose):
    '''
    Poll for new nodes and break them as required.
    Runs an endless loop.
    '''
    # can't assign to local variable from nested function in python 2
    # but can mutate a list (standard hack)
    broken = [0]
    def maybe_break_node(*args, **kwargs):
        if max_nodes_to_break >= 0 and broken[0] >= max_nodes_to_break:
            if verbose:
                print('Maximum number of instances already broken, will not break {}'.format(args[1]))
        else:
            break_node(*args, **kwargs)
            broken[0] += 1
    instances = get_instances(master, ng)
    known = set()
    for inst in instances:
        if existing:
            maybe_break_node(master, inst, broken_ips, verbose)
        known.add(inst.name)
    while True:
        instances = get_instances(master, ng)
        for inst in instances:
            if inst.name in known:
                continue
            if verbose:
                print('New instance observed: {}'.format(inst.name))
            if upcoming:
                maybe_break_node(master, inst, broken_ips, verbose)
            known.add(inst.name)
        time.sleep(5)