import re


def short_name_generator(organism_name, dico_short_name):
        """ Generates an unique short name from a an organism name. The dictionary with all the short name is required.
        """
        base = organism_name[0] + str(organism_name.split('_')[1])[0:2]
        short_name = base + str(sum((1 for x in dico_short_name if re.match(base, x))) + 1)
        return short_name