Move `custom_model` example in docs into a separate Python file.