code: def test_borrow_doc():
      class A(object):
          def met1(self):
              """met1doc"""
              pass  # pragma: no cover
  
          def met2(self):
              """met2doc"""
              pass  # pragma: no cover
  
      class B(object):
          @borrowdoc(A)
          def met1(self):
              pass  # pragma: no cover
  
          @borrowdoc(A, "met1")
          def met2(self):
              pass  # pragma: no cover
  
      assert_equal(B.met1.__doc__, A.met1.__doc__)
      assert_equal(B.met2.__doc__, A.met1.__doc__)
  
imports: from unittest.mock import patch
  from datalad.tests.utils_pytest import assert_equal, assert_re_in, assert_true
  from ..dochelpers import borrowdoc, borrowkwargs, single_or_plural
label_desc: Use image node_id 2 for calling a global function with example usage: test_borrow_doc() without return types