def clean_up_file_name(filename):
    """
    If FILENAME has spaces in it, replaces them with underscores. Otherwise,
    this function returns the filename unchanged.
    """

    words = filename.split()
    if len(words) > 1:
        filename = "_".join(words)
    return filename