code: def test_statsd_gauge(
      response_value: str,
      expected_exception: Optional[Exception],
      expected_result: str,
  ) -> None:
      @decorators.statsd_gauge("custom.prefix")
      def my_func(
          response: ResponseValues, *args: Any, **kwargs: Any
      ) -> str:
          if response == ResponseValues.FAIL:
              raise ValueError("Error")
          if response == ResponseValues.WARN:
              raise FileNotFoundError("Not found")
          return "OK"
  
      with patch.object(app.config["STATS_LOGGER"], "gauge") as mock:
          cm = (
              pytest.raises(expected_exception)
              if isclass(expected_exception)
              and issubclass(expected_exception, Exception)
              else nullcontext()
          )
  
          with cm:
              my_func(response_value, 1, 2)
              mock.assert_called_once_with(expected_result, 1)
  
file_path: superset/tests/unit_tests/utils/test_decorators.py
imports: import uuid
  from contextlib import nullcontext
  from inspect import isclass
  from typing import Any, Optional
  from unittest.mock import call, Mock, patch
  import pytest
  from superset import app
  from superset.utils import decorators
  from superset.utils.backports import StrEnum
label_desc: Use image node_id 2 for calling a global function with example usage: test_statsd_gauge(response_value, expected_exception, expected_result) and returns: str