def get_name(self,item):
if not isinstance(item,ford.sourceform.FortranBase):<EOL><INDENT>raise Exception('<STR_LIT>'.format(str(item)))<EOL><DEDENT>if item in self._items:<EOL><INDENT>return self._items[item]<EOL><DEDENT>else:<EOL><INDENT>if item.get_dir() not in self._counts:<EOL><INDENT>self._counts[item.get_dir()] = {}<EOL><DEDENT>if item.name in self._counts[item.get_dir()]:<EOL><INDENT>num = self._counts[item.get_dir()][item.name] + <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>num = <NUM_LIT:1><EOL><DEDENT>self._counts[item.get_dir()][item.name] = num<EOL>name = item.name.lower().replace('<STR_LIT:<>','<STR_LIT>')<EOL>name = name.replace('<STR_LIT:>>','<STR_LIT>')<EOL>name = name.replace('<STR_LIT:/>','<STR_LIT>')<EOL>if name == '<STR_LIT>': name = '<STR_LIT>'<EOL>if num > <NUM_LIT:1>:<EOL><INDENT>name = name + '<STR_LIT>' + str(num)<EOL><DEDENT>self._items[item] = name<EOL>return name<EOL><DEDENT>
Return the name for this item registered with this NameSelector.
If no name has previously been registered, then generate a new
one.