code: def test_copy_doc():
      """Test decorator for copying docstrings."""
  
      class A:
          def m1():
              """Docstring for m1."""
              pass
  
      class B:
          def m1():
              pass
  
      class C(A):
          @copy_doc(A.m1)
          def m1():
              pass
  
      assert C.m1.__doc__ == "Docstring for m1."
      pytest.raises(ValueError, copy_doc(B.m1), C.m1)
  
imports: import webbrowser
  import pytest
  from mne import grade_to_tris, open_docs
  from mne.utils import catch_logging, copy_doc, copy_function_doc_to_method_doc, deprecated, deprecated_alias, legacy, linkcode_resolve
label_desc: Use image node_id 6 for calling a global function with example usage: test_copy_doc() without return types