# 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/7794b61a6e76230e8c7a49bdce808b3728305914/libs/code/deepagents_code/doctor.py#L471)