code: def test_patch_super():
      from ...tests.core import patch_cls, patch_super as super
  
      @patch_cls(B)
      class D(B):
          def __init__(self):
              super().__init__()
              self.value += ["D"]
  
          def test_method(self):
              return (
                  super().test_method() + super().test_method2() + ["D"]
              )
  
          @classmethod
          def test_classmethod(cls):
              return (
                  super().test_classmethod()
                  + super().test_classmethod2()
                  + ["D"]
              )
  
      b = B()
      assert B.test_classmethod() == ["A", "B", "A", "BB", "D"]
      assert b.test_method() == ["A", "B", "A", "BB", "D"]
      assert b.value == ["A", "B", "D"]
  
      c = C()
      assert C.test_classmethod() == ["A", "B", "A", "BB", "D", "C"]
      assert c.test_method() == ["A", "B", "A", "BB", "D", "C"]
      assert c.value == ["A", "B", "D", "C"]
  
      @patch_cls(Dummy)
      class E:
          def __init__(self):
              super().__init__()
  
          def test_method(self):
              return super().test_method() + ["D"]
  
          @classmethod
          def test_classmethod(cls):
              return super().test_classmethod() + ["D"]
  
      dummy = Dummy()
      with pytest.raises(AttributeError):
          dummy.test_method()
      with pytest.raises(AttributeError):
          Dummy.test_classmethod()
  
file_path: mars/mars/services/tests/test_patch.py
imports: import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: test_patch_super() and returns: unknown, unknown, unknown, unknown