@classmethod
def set_label(cls, label):
    """
        update the internal counter if needed
        """
    if len(label) == 1:
        code = ord(label) - 97
    elif len(label) == 2:
        code = (ord(label[0]) - 96) * 26 + (ord(label[1]) - 97)
    else:
        code = (ord(label[0]) - 96) * 26 * 26 + (ord(label[1]) - 97) * 26 + (
            ord(label) - 97)
    if cls.last_label <= code:
        cls.last_label = code + 1
    return code
