code: def requires_application(
      backend=None, has=(), capable=(), force_gc=True
  ):
      """Return a decorator for tests that require an application"""
      good, msg = has_application(backend, has, capable)
      dec_backend = skipif(not good, reason="Skipping test: %s" % msg)
      try:
          import pytest
      except Exception:
          return dec_backend
      dec_app = pytest.mark.vispy_app_test
      funcs = [dec_app, dec_backend]
      if force_gc:
          funcs.append(garbage_collect)
      return composed(*funcs)
  
imports: from __future__ import print_function
  import numpy
  import sys
  import os
  import inspect
  import gc
  import pytest
  import functools
  from packaging.version import Version
  from ..util.check_environment import has_backend
label_desc: Use image node_id 19 for calling a global function with example usage: requires_application(backend, has, capable, force_gc) and returns: composed, dec_backend