(name, sleep_time, decay_time, collector_class, *args)
return atomic_ref
other module should use this fn to init a collector, this fn start a thread
    to run the collector and return an atomic_ref so outside world can get metrics
    collected by this collector
other module should use this fn to init a collector, this fn start a thread
    to run the collector and return an atomic_ref so outside world can get metrics
    collected by this collector
other module should use this fn to init a collector this fn start a thread to run the collector and return an atomic_ref so outside world can get metrics collected by this collector
def make_collector(name, sleep_time, decay_time, collector_class, *args):
    """ other module should use this fn to init a collector, this fn start a thread
    to run the collector and return an atomic_ref so outside world can get metrics
    collected by this collector """
    atomic_ref, instance = instantiate_collector(name, sleep_time, decay_time,
                                                 collector_class, *args)

    t = threading.Thread(target=instance.collect,
                         name=name,
                         args=(),
                         daemon=True)

    t.start()

    return atomic_ref
def make_collector ( name , sleep_time , decay_time , collector_class , * args ) : atomic_ref , instance = instantiate_collector ( name , sleep_time , decay_time , collector_class , * args ) t = threading . Thread ( target = instance . collect , name = name , args = ( ) , daemon = True ) t . start ( ) return atomic_ref