def get_capability(out_iter, kwargs, final, value):
    _log.debug("shadow_match:get_capability BEGIN")
    if final[0]:
        _log.debug("shadow_match:get_capability FINAL")
        out_iter.auto_final(kwargs['counter'])
    else:
        kwargs['counter'] += 1
        _log.debug("shadow_match:get_capability GET %s counter:%d" % (value, kwargs['counter']))
        out_iter.append(kwargs['node'].storage.get_index_iter(['node', 'capabilities', value], include_key=True))
    _log.debug("shadow_match:get_capability END")
dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/runtime/north/plugins/requirements/shadow_actor_reqs_match.py/get_capability/original