def wrap_function(self, func):
        def f(*args, **kwds):
            # Start time
            timestamps = [_get_memory(os.getpid(), timestamps=True)]
            self.functions[func].append(timestamps)
            try:
                return func(*args, **kwds)
            finally:
                # end time
                timestamps.append(_get_memory(os.getpid(), timestamps=True))
        return f
Iterate over all image sentence groups
dataset/ETHPy150Open fabianp/memory_profiler/memory_profiler.py/TimeStamper.wrap_function--crossover with--dataset/ETHPy150Open NervanaSystems/neon/neon/data/imagecaption.py/ImageCaption.iterImageSentenceGroup