def network_io_counters(interface=None):
    '''
    Return network I/O statistics.

    CLI Example:

    .. code-block:: bash

        salt '*' ps.network_io_counters

        salt '*' ps.network_io_counters interface=eth0
    '''
    if not interface:
        return dict(psutil.net_io_counters()._asdict())
    else:
        stats = psutil.net_io_counters(pernic=True)
        if stats in interface:
            return dict(stats[interface]._asdict())
        else:
            return False
dataset/ETHPy150Open saltstack/salt/salt/modules/ps.py/network_io_counters/swapped operands of `in`