def req_op(node, signature, shadow_params, actor_id=None, component=None):
    # Lookup signature to get a list of ids of the actor types
    signature_iter = node.storage.get_index_iter(['actor', 'signature', signature])
    signature_iter.set_name("shadow_match:sign")
    # Lookup description for all matching actor types
    description_iter = dynops.Map(get_description, signature_iter, eager=True, counter=0, node=node)
    description_iter.set_name("shadow_match:desc")
    # Filter with matching parameters and return set of needed capabilities
    extract_caps_iter = dynops.Map(extract_capabilities, description_iter, eager=True, 
                                   shadow_params=shadow_params, capabilities=set([]), descriptions=[])
    extract_caps_iter.set_name("shadow_match:extract")
    # Lookup nodes having each capability
    get_caps_iter = dynops.Map(get_capability, extract_caps_iter, eager=True, counter=0, node=node)
    get_caps_iter.set_name("shadow_match:caps")
    # Previous returned iterable with iterables, chain them to one iterable
    collect_caps_iter = dynops.Chain(get_caps_iter)
    collect_caps_iter.set_name("shadow_match:collect")
    # return nodes that can host first seen actor type with all capabilities fulfilled
    placement_iter = dynops.Map(placement, collect_caps_iter, capabilities={}, 
                                descriptions=extract_caps_iter.get_kwargs()['descriptions'])
    placement_iter.set_name("shadow_match:place")
    return placement_iter
Ensure that base dirs exists.
dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/runtime/north/plugins/requirements/shadow_actor_reqs_match.py/req_op--crossover with--dataset/ETHPy150Open jessemyers/cheddar/cheddar/index/storage.py/DistributionStorage._make_base_dirs