def _parseLabelSpec(label_spec):

    if not ':' in label_spec:
        raise error.TopologyError('Invalid label description: %s' % label_spec)

    label_type_alias, label_range = label_spec.split(':', 1)
    try:
        label_type = LABEL_TYPES[label_type_alias]
    except __HOLE__:
        raise error.TopologyError('Label type %s does not map to proper label.' % label_type_alias)

    return nsa.Label(label_type, label_range) # range is parsed in nsa.Label
dataset/ETHPy150Open NORDUnet/opennsa/opennsa/topology/nrm.py/_parseLabelSpec