code: def require_webhooks(test_case):
      """
      Decorator to mark tests that requires `webhooks` extra (i.e. gradio, fastapi, pydantic).
  
      git-lfs requires additional dependencies, and tests are skipped by default. Set the RUN_GIT_LFS_TESTS environment
      variable to a truthy value to run them.
      """
      if not is_gradio_available():
          return unittest.skip("Skip webhook test")(test_case)
      else:
          return test_case
  
imports: import inspect
  import os
  import shutil
  import stat
  import time
  import unittest
  import uuid
  from contextlib import contextmanager
  from enum import Enum
  from functools import wraps
  from pathlib import Path
  from typing import Callable, Optional, Type, TypeVar, Union
  from unittest.mock import Mock, patch
  import pytest
  import requests
  from huggingface_hub.utils import is_gradio_available, logging, reset_sessions
  from tests.testing_constants import ENDPOINT_PRODUCTION, ENDPOINT_PRODUCTION_URL_SCHEME
label_desc: Use image node_id 5 for calling a global function with example usage: require_webhooks(test_case) and returns: unittest, test_case