code: def test_basic_patch_for_class(gorilla_setting):
      A, B = gen_class_A_B()
  
      original_A_f1 = A.f1
      original_A_f2 = A.f2
      original_B_f1 = B.f1
  
      def patched_A_f1(self):  # pylint: disable=unused-argument
          pass
  
      def patched_A_f2(self):  # pylint: disable=unused-argument
          pass
  
      def patched_B_f1(self):  # pylint: disable=unused-argument
          pass
  
      patch_A_f1 = gorilla.Patch(A, "f1", patched_A_f1, gorilla_setting)
      patch_A_f2 = gorilla.Patch(A, "f2", patched_A_f2, gorilla_setting)
      patch_B_f1 = gorilla.Patch(B, "f1", patched_B_f1, gorilla_setting)
  
      assert gorilla.get_original_attribute(A, "f1") is original_A_f1
      assert gorilla.get_original_attribute(B, "f1") is original_B_f1
      assert gorilla.get_original_attribute(B, "f2") is original_A_f2
  
      gorilla.apply(patch_A_f1)
      assert A.f1 is patched_A_f1
      assert gorilla.get_original_attribute(A, "f1") is original_A_f1
      assert gorilla.get_original_attribute(B, "f1") is original_B_f1
  
      gorilla.apply(patch_B_f1)
      assert A.f1 is patched_A_f1
      assert B.f1 is patched_B_f1
      assert gorilla.get_original_attribute(A, "f1") is original_A_f1
      assert gorilla.get_original_attribute(B, "f1") is original_B_f1
  
      gorilla.apply(patch_A_f2)
      assert A.f2 is patched_A_f2
      assert B.f2 is patched_A_f2
      assert gorilla.get_original_attribute(A, "f2") is original_A_f2
      assert gorilla.get_original_attribute(B, "f2") is original_A_f2
  
      gorilla.revert(patch_A_f2)
      assert A.f2 is original_A_f2
      assert B.f2 is original_A_f2
      assert gorilla.get_original_attribute(A, "f2") == original_A_f2
      assert gorilla.get_original_attribute(B, "f2") == original_A_f2
  
      gorilla.revert(patch_B_f1)
      assert A.f1 is patched_A_f1
      assert B.f1 is original_B_f1
      assert gorilla.get_original_attribute(A, "f1") == original_A_f1
      assert gorilla.get_original_attribute(B, "f1") == original_B_f1
  
      gorilla.revert(patch_A_f1)
      assert A.f1 is original_A_f1
      assert B.f1 is original_B_f1
      assert gorilla.get_original_attribute(A, "f1") == original_A_f1
      assert gorilla.get_original_attribute(B, "f1") == original_B_f1
  
file_path: mlflow/tests/utils/test_gorilla.py
imports: import pytest
  from mlflow.utils import gorilla
label_desc: Use image node_id 4 for calling a global function with example usage: test_basic_patch_for_class(gorilla_setting) without return types