code: def killCells(i, options, tm):
    
  
    # Kill cells if called for
    if options.simulation == "killer":
  
      if i == options.switchover:
        print "i=",i,"Killing cells for the first time!"
        tm.killCells(percent = options.noise)
  
      if i == options.secondKill:
        print "i=",i,"Killing cells again up to",options.secondNoise
        tm.killCells(percent = options.secondNoise)
  
    elif options.simulation == "killingMeSoftly" and (i%100 == 0):
      steps = (options.secondKill - options.switchover)/100
      nsteps = (options.secondNoise - options.noise)/steps
      noise = options.noise + nsteps*(i-options.switchover)/100
      if i in xrange(options.switchover, options.secondKill+1):
        print "i=",i,"Killing cells!"
        tm.killCells(percent = noise)
docs: Kill cells as appropriate