code: def validate_name(self, name, agent):
          
          if name in self.bot_names_to_agent_dict and self.bot_names_to_agent_dict[name] is not agent:
              i = 0
              while True:
                  if name + " (" + str(i) + ")" in self.bot_names_to_agent_dict and \
                          self.bot_names_to_agent_dict[name + " (" + str(i) + ")"] is not agent:
                      i += 1
                  else:
                      value = name + " (" + str(i) + ")"
                      return value
          else:
              return name
docs: Finds the modification of name which is not yet in the list
          :param name: the (new) name for the agent
          :param agent: the agent instance to allow the same name as the previous one if necessary
          :return: the best modification of name not yet in a listwidget