def trainerThreadFunction():
    global lock, counter
    time.sleep(1)
    while (True):
        lock.acquire()
        print("Lock given to Trainer Thread")
        trainer = Trainer(counter)
        trainer.trainModels()
        trainer.end()
        print("Lock Released by Trainer Thread")
        displayStatistics()
        lock.release()
        time.sleep(10800)