def pruneLabels(path):
    for idx, link in enumerate(path):

        if any( [ n in link.src_stp.network for n in NETWORKS ] ):
            liv = link.src_stp.label.intersect(link.dst_stp.label)
            lnv = nsa.Label(liv.type_, liv.labelValue())
            link.src_stp.label = lnv
            link.dst_stp.label = lnv

            if idx > 0:
                prev_link = path[idx-1]
                prev_link.dst_stp.label = lnv

            if idx < len(path) - 1:
                next_link = path[idx+1]
                next_link.src_stp.label = lnv

    return path
Prepares the incoming data for the database.
dataset/ETHPy150Open NORDUnet/opennsa/opennsa/plugins/pruner.py/pruneLabels--crossover with--dataset/ETHPy150Open jarcoal/django-sliver/sliver/views.py/Resource.hydrate