def flip(f: Callable) -> Function:
    """
        flip order of first two arguments to function.
    """
    nargs_, nouts_, ndefs_ = nargs(f), nouts(f), ndefs(f)
    return WrappedFunction(lambda *args, **kwargs: f(args[1], args[0], *args[2:], **kwargs),
                           nargs=nargs_, nouts=nouts_, ndefs=ndefs_)
flip order of first two arguments to function.