def flush(table='filter', chain='', family='ipv4'):
    if not check_table(table, family=family):
        return 'Error: table {0} in family {1} does not exist'.\
                format(table, family)

    nft_family = _NFTABLES_FAMILIES[family]

    if chain:
        if not check_chain(table, chain, family=family):
            return 'Error: chain {0} in table {1} in family {2} does not exist'.\
                    format(chain, table, nft_family)
        cmd = '{0} flush chain {1} {2} {3}'.\
                format(_nftables_cmd(), nft_family, table, chain)
    else:
        cmd = '{0} flush table {1} {2}'.\
                format(_nftables_cmd(), nft_family, table)
    out = __salt__['cmd.run'](cmd, python_shell=False)

    if len(out) == 0:
        return True
    else:
        return False
Transform an expression into a multinomial form.
dataset/ETHPy150Open saltstack/salt/salt/modules/nftables.py/flush--crossover with--dataset/ETHPy150Open sympy/sympy/sympy/polys/polyutils.py/_dict_from_expr