Doc: Added imports to code examples and fixed submasks.