def get_unique_name(name='<STR_LIT>', collection=()):
if name not in collection:<EOL><INDENT>return name<EOL><DEDENT>i = <NUM_LIT:1><EOL>while True:<EOL><INDENT>i += <NUM_LIT:1><EOL>name2 = '<STR_LIT>' % (name, i)<EOL>if name2 not in collection:<EOL><INDENT>return name2<EOL><DEDENT><DEDENT>
Generate a unique name (str type) by appending a sequence number to
the original name so that it is not contained in the collection.
``collection`` has a __contains__ method (tuple, list, dict, etc.)