def installStatsLoop(statsFile, statsDelay):

  def dumpStats():
    """Actual stats dump function."""
    scales.dumpStatsTo(statsFile)
    reactor.callLater(statsDelay, dumpStats)

  def startStats():
    """Starts the stats dump in "statsDelay" seconds."""
    reactor.callLater(statsDelay, dumpStats)

  reactor.callWhenRunning(startStats)
Factory method for creating Scribbles.
dataset/ETHPy150Open Cue/scales/src/greplin/scales/loop.py/installStatsLoop--crossover with--dataset/ETHPy150Open caktus/django-scribbler/scribbler/tests/base.py/ScribblerDataTestCase.create_scribble