def _unique_parnames(names):
 upper_names = set()
 unique_names = []
 for name in names:
  name_upper = name.upper()
  while (name_upper in upper_names):
   name = ('_' + name)
   name_upper = ('_' + name_upper)
  unique_names.append(name)
  upper_names.add(name_upper)
 return unique_names

def _unique_parnames ( names ) : upper_names = set ( ) unique_names = [ ] for name in names : name_upper = name . upper ( ) while ( name_upper in upper_names ) : name = ( '_' + name ) name_upper = ( '_' + name_upper ) unique_names . append ( name ) upper_names . add ( name_upper ) return unique_names
given a list of parnames .