

def __new__(mcs, name, bases, dct):
    base_name = dct['_VARZ_BASE_NAME']
    for (metric_suffix, varz_cls) in dct['_VARZ'].iteritems():
        metric_name = ('%s.%s' % (base_name, metric_suffix))
        VarzReceiver.RegisterMetric(metric_name, varz_cls.VARZ_TYPE)
        varz = varz_cls(metric_name, None)
        dct['_VARZ'][metric_suffix] = varz
        dct[metric_suffix] = varz
    return super(VarzMeta, mcs).__new__(mcs, name, bases, dct)

dataset/ETHPy150Open steveniemitz/scales/scales/varz.py VarzMeta.__new__/original