code: def test_patch_on_attribute_not_exist(store_hit):
      A, _ = gen_class_A_B()
  
      def patched_fx(self):  # pylint: disable=unused-argument
          return 101
  
      gorilla_setting = gorilla.Settings(
          allow_hit=True, store_hit=store_hit
      )
      fx_patch = gorilla.Patch(A, "fx", patched_fx, gorilla_setting)
      gorilla.apply(fx_patch)
      a1 = A()
      assert a1.fx() == 101
      gorilla.revert(fx_patch)
      assert not hasattr(A, "fx")
  
file_path: mlflow/tests/utils/test_gorilla.py
imports: import pytest
  from mlflow.utils import gorilla
label_desc: Use image node_id 7 for calling a global function with example usage: test_patch_on_attribute_not_exist(store_hit) and returns: int