Documentation code sample fixes
Several code examples in the docs will fail if used as is. In many cases, it's a missing dependency, other times, this is due to naming inconsistency, one may be related to a change in API, and a few are due to the execution order (i.e., things used before defined in a tutorial). 
This maintenance PR fixes these issues so that the code samples in the docs work as expected and do not cause unnecessary frustration. 


_The documentation is not available anymore as the PR was closed or merged._