def _worker_status(target,
                   worker,
                   activation,
                   profile='default',
                   expr_form='glob'):

    ret = {
        'result': True,
        'errors': [],
        'wrong_state': [],
    }

    args = [worker, profile]
    status = __salt__['publish.publish'](
        target, 'modjk.worker_status', args, expr_form
    )

    # Did we got any respone from someone ?
    if not status:
        ret['result'] = False
        return ret

    # Search for errors & status
    for balancer in status:
        if not status[balancer]:
            ret['errors'].append(balancer)
        elif status[balancer]['activation'] != activation:
            ret['wrong_state'].append(balancer)

    return ret
Check if the worker is in `activation` state in the targeted load balancers
dataset/ETHPy150Open saltstack/salt/salt/states/modjk_worker.py/_worker_status