code: def deactivate_program(self, program):
          
          self.logger.debug("deactivate_program %s", program)
  
          with self._program_lock:
              self.logger.debug("deactivate_program got through %s", program)
              if program not in self.program_stack:
                  import ipdb
                  ipdb.set_trace()
              self.program_stack.remove(program)
              if program in self.program_status:
                  del self.program_status[program]
              self._update_program_stack()
docs: Called by program, when it is deactivated.