code: def _install_nukeassist(use_threaded_wrapper):
      
      import nuke
  
      if "--nukeassist" not in nuke.rawArgs:
          raise ImportError
  
      def threaded_wrapper(func, *args, **kwargs):
          return nuke.executeInMainThreadWithResult(
              func, args, kwargs)
  
      _common_setup("NukeAssist", threaded_wrapper, use_threaded_wrapper)
docs: Helper function to The Foundry NukeAssist support