code: def terminate(self):
          
  
          self.info_log('The test batch is finished.')
  
          with DbSessionContext(BROME_CONFIG['database']['mongo_database_name']) as session:  # noqa
              test_batch = session.query(Testbatch)\
                  .filter(Testbatch.mongo_id == self.test_batch_id).one()
              test_batch.ending_timestamp = utcnow()
              test_batch.terminated = True
              session.save(test_batch, safe=True)
  
          self.print_test_summary(self.executed_tests)
docs: Terminate the test batch