code: def with_feature_flags(**mock_feature_flags):
      """
      Use this decorator to mock feature flags in tests.integration_tests.
  
      Usage:
  
          class TestYourFeature(SupersetTestCase):
  
              @with_feature_flags(YOUR_FEATURE=True)
              def test_your_feature_enabled(self):
                  self.assertEqual(is_feature_enabled("YOUR_FEATURE"), True)
  
              @with_feature_flags(YOUR_FEATURE=False)
              def test_your_feature_disabled(self):
                  self.assertEqual(is_feature_enabled("YOUR_FEATURE"), False)
      """
  
      def mock_get_feature_flags():
          feature_flags = feature_flag_manager._feature_flags or {}
          return {**feature_flags, **mock_feature_flags}
  
      def decorate(test_fn):
          def wrapper(*args, **kwargs):
              with patch.object(
                  feature_flag_manager,
                  "get_feature_flags",
                  side_effect=mock_get_feature_flags,
              ):
                  test_fn(*args, **kwargs)
  
          return functools.update_wrapper(wrapper, test_fn)
  
      return decorate
  
imports: from __future__ import annotations
  import contextlib
  import functools
  import os
  from typing import Any, Callable, TYPE_CHECKING
  from unittest.mock import patch
  import pytest
  from flask.ctx import AppContext
  from flask_appbuilder.security.sqla import models
  from sqlalchemy.engine import Engine
  from superset import db, security_manager
  from superset.extensions import feature_flag_manager
  from superset.utils.core import json_dumps_w_dates
  from superset.utils.database import get_example_database, remove_database
  from tests.integration_tests.test_app import app, login
label_desc: Use image node_id 12 for calling a global function with example usage: with_feature_flags() and returns: decorate, dict, functools