def remove_remap_file(filename):
    """Remove any mapping for *filename* and return that if it exists"""
    global file2file_remap
    if filename in file2file_remap:
        retval = file2file_remap[filename]
        del file2file_remap[filename]
        return retval
    return None