# collect_sections

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/doctor/collect_sections)

Gather every diagnostic section in display order.

## Signature

```python
collect_sections() -> list[DiagnosticSection]
```

## Returns

`list[DiagnosticSection]`

The diagnostic sections, in render order.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/caaa7e7c12d214afa5cf0a1afed8eb6232aa6f7b/libs/code/deepagents_code/doctor.py#L752)