generate_numbered_unique_names() effectively ignores the counter argument
It always starts counting at 0:
def generate_numbered_unique_names(prefix, num=None):
orig_num = num
num = 0
if orig_num is None:
yield (num, prefix)
while True:
name = "%s_%d" % (prefix, num)
num += 1
yield (num, name)
This is in part a cause of loopy#110 (closed).