def _mult_replace(text,*A,**replacements):
    """
    Simple tool to replace text with replacements dictionary.
    Input can be either `param=val` or (param,val) tuples.
    
    Can also invert if _invert=True
    """
    invert = replacements.pop('_invert',False)
    for item in A:
        if isinstance(item,dict):
            replacements.update(item)
    
    for key,val in replacements.items():
        if invert:
            val,key = key,val
        text = text.replace(key,val)
    return text