Fix `__doc__` on unbound method (#2958)

(cherry picked from commit 177cf4d859d3ed52dfc76f30d8524e1d20e45b59)
3 files changed