import re


def _tidy_title(title: str) -> str:
    """
    Transforms title string into lowercase alphanumerical sequence separated by underscores.

    :param title: str
    :return: str
    """
    new_title = re.sub("([a-z])([A-Z])", r"\g<1> \g<2>", title)  # CamelCase -> words with spaces
    new_title = new_title.lower()  # to lower case
    new_title = re.sub(r'%', '_percent', new_title)  # replace % symbol with "_percent"
    new_title = re.sub(r'[=-\\.,]', ' ', new_title)  # replace some special characters with spaces
    new_title = re.sub(r'[^\w\s]', '', new_title).strip()  # remove remaining special characters
    new_title = re.sub(r'\s+', '_', new_title)  # replace sequences of spaces with an underscore
    return new_title