import re


def normalize_file_name(fname):
    """
    Remove/replace characters in the string so that the string is suitable 
    to be used as a file name.
    """
    t = fname 
    t = re.sub('[^0-9A-Za-z_-]', '_', t )
    t = re.sub('_+', '_', t)
    return t