code: def join_or_run(fn):
      @wraps(fn)
      def wrapper(self):
          if threading.current_thread() == threading.main_thread():
              self._join_threads()
          else:
              fn(self)
  
      return wrapper
  
file_path: CrypTen/test/multithread_test_case.py
imports: import queue
  import sys
  import threading
  import unittest
  from functools import wraps
  from threading import Thread
  import crypten
label_desc: Use image node_id 5 for calling the MultiThreadTestCase obj's underlying member method code with example usage: obj.join_or_run(fn) and returns: wrapper