def patch_class_one(self, clazz, function, name):
        if hasattr(clazz, '_monkey_timer_patched'):
            raise Exception('can only patch once with patch_class')
        timer = self
        class _ProxyClass(clazz):
            def __init__(self, *a, **b):
                orig = clazz.__dict__[function.__name__]
                self.__dict__[function.__name__] = MethodType(timer.patch_function(orig, name), self, _ProxyClass)
                clazz.__init__(self, *a, **b)
        _ProxyClass._monkey_timer_patched = True
        return _ProxyClass
count numbers of motifs, but only once per sequence
dataset/ETHPy150Open ooici/pyon/pyon/util/monkey_timer.py/MonkeyTimer.patch_class_one--crossover with--dataset/ETHPy150Open CGATOxford/cgat/CGAT/Motifs.py/getOccurances