import re


def clean_filename(unclean_name: str) -> str:
    """
    Return a valid filename where any character that is not
    a letter, number, dash, underscore, space, or period
    is replaced with an underscore
    """
    return re.sub(r'[^\w\-_. ]', '_', unclean_name)