code: def webdriver_test(testfunc):
      @functools.wraps(testfunc)
      def wrapper(self, *args, **kwds):
          self.needs_resources()
  
          if os.environ.get("RUN_WEBDRIVER") != "1":
              self.skipTest("Webdriver not requested")
          from selenium import webdriver
  
          for driver in [
              "Firefox",
              "Chrome",
          ]:
              with self.subTest(driver=driver):
                  wd = getattr(webdriver, driver)()
                  testfunc(self, wd, *args, **kwds)
                  wd.close()
  
      return wrapper
  
imports: import os
  import io
  import functools
  import tempfile
  import urllib
  import unittest
  import torch
  import torch.backends.xnnpack
  import torch.utils.model_dump
  import torch.utils.mobile_optimizer
  from torch.testing._internal.common_utils import TestCase, run_tests, IS_WINDOWS, skipIfNoXNNPACK
  from torch.testing._internal.common_quantized import supported_qengines
label_desc: Use image node_id 1 for calling a global function with example usage: webdriver_test(testfunc) and returns: wrapper