code: def uniquify(value, seen_values):
      
      id = 1
      new_value = value
      while new_value in seen_values:
          new_value = "%s%s" % (value, id)
          id += 1
      seen_values.add(new_value)
      return new_value
docs: Adds value to seen_values set and ensures it is unique