This is 100% true. I am constantly frustrated by incomplete code examples in documentation. The one thing in particular that bothers me the most are when Python snippets don't show the import statements.
do_magic(param, other_param)
Where do I import do_magic from?!?!