def METHOD_NAME(re_name_to_new_val, initial_contents):
    contents = initial_contents
    for key, val in re_name_to_new_val.iteritems():
        contents = re.sub(key, val, contents)
    return contents