[1.5.X] Fixed #18883 -- added a missing self parameter in the docs

Backport of 17d57275f9 from master