def replace_all(text, terms):
    """
    Replace all the terms contained
    in a dict {'from':'to'}.
    """
    for _from, _to in terms.items():
        text = text.replace(_from, _to)

    return text