import re


def sanatize_text(text):
    """ Replace non alphanumeric characters in text with '_'
    Parameters
    ----------
    text : str
        text to sanatize
    Returns
    -------
    text
        the sanatized text
    """
    if text is None:
        return text
    return re.sub('[^a-zA-Z0-9]', '_', text.strip())