def _is_running_from_main_thread():
    return tornado.ioloop.IOLoop.current(instance=False)
Excerpt from `Django docs
dataset/ETHPy150Open spotify/luigi/test/server_test.py/_is_running_from_main_thread--crossover with--dataset/ETHPy150Open lsaffre/lino/lino/core/choicelists.py/ChoiceListField.get_prep_value