Kernel api doc, part 2 (#46889)
* doc: add note about guarding imports in kernel
* doc: use layers.py instead of the previous dirty way
* doc: add version and trust remote code
* doc: update the expected structure in doc
* doc: rephrase transformers guard
* doc: address comment about metadata
* doc: formatting
* Update docs/source/en/kernel_doc/writing_kernels.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
---------
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>