code: def skip_unless_spark_backend(reason="requires Spark"):
      from hail.backend.spark_backend import SparkBackend
  
      @decorator
      def wrapper(
          func: Callable[P, T], *args: P.args, **kwargs: P.kwargs
      ) -> T:
          if isinstance(hl.utils.java.Env.backend(), SparkBackend):
              return func(*args, **kwargs)
          else:
              raise unittest.SkipTest(reason)
  
      return wrapper
  
imports: from typing import Callable, TypeVar
  from typing_extensions import ParamSpec
  import os
  from timeit import default_timer
  import unittest
  import pytest
  from hailtop.hail_decorator import decorator
  from hail.utils.java import choose_backend
  import hail
label_desc: Use image node_id 14 for calling a global function with example usage: skip_unless_spark_backend(reason) and returns: wrapper, func