def parseLabel(label_part):
    if not '=' in label_part:
        raise error.PayloadError('No = in urn label part (%s)' % label_part)

    label_short_type, label_value = label_part.split('=')
    try:
        label_type = LABEL_MAP[label_short_type]
    except __HOLE__:
        raise error.PayloadError('Label type %s not recognized')

    return nsa.Label(label_type, label_value)
dataset/ETHPy150Open NORDUnet/opennsa/opennsa/protocols/nsi2/helper.py/parseLabel