Move get_this_instance() to utils.py