def status(name, sig=None):
    '''
    Return the status for a service, returns the PID or an empty string if the
    service is running or not, pass a signature to use to find the service via
    ps

    CLI Example:

    .. code-block:: bash

        salt '*' service.status <service name> [service signature]
    '''
    cmd = ['sc', 'query', name]
    statuses = __salt__['cmd.run'](cmd, python_shell=False).splitlines()
    for line in statuses:
        if line in 'RUNNING':
            return True
        elif 'STOP_PENDING' in line:
            return True
    return False
dataset/ETHPy150Open saltstack/salt/salt/modules/win_service.py/status/swapped operands of `in`