code: def wrap_test_forked(func):
      """Decorate a function to test, call in subprocess"""
  
      @wraps(func)
      def f(*args, **kwargs):
          # automatically list or set, so can globally control server ports or host for all tests
          gradio_port = os.environ["GRADIO_SERVER_PORT"] = os.getenv(
              "GRADIO_SERVER_PORT", str(7860)
          )
          gradio_port = int(gradio_port)
          # testtotalmod, testmod = get_mods()
          # gradio_port += testmod
          os.environ["HOST"] = os.getenv(
              "HOST", "http://localhost:%s" % gradio_port
          )
  
          pytest_name = get_test_name()
          if do_skip_test(pytest_name):
              # Skipping is based on raw name, so deterministic
              pytest.skip(
                  "[%s] TEST SKIPPED due to TESTMODULO" % pytest_name
              )
          func_new = partial(
              call_subprocess_onetask, func, args, kwargs
          )
          return run_test(func_new)
  
      return f
  
imports: import hashlib
  import os
  import sys
  import shutil
  from functools import wraps, partial
  import pytest
  from src.utils import call_subprocess_onetask, makedirs, FakeTokenizer, download_simple, sanitize_filename
label_desc: Use image node_id 5 for calling a global function with example usage: wrap_test_forked(func) and returns: f, run_test