def named_base_type_factory(v, l):
    return type(
        'labeled_{}'.format(type(v).__name__),
        (type(v), ),
        {'label': l, 'value': v})(v)
Note this does not work
dataset/ETHPy150Open eBay/bayesian-belief-networks/bayesian/utils.py/named_base_type_factory