# retention_bucket_for_level

> **Function** in `deepagents_code`

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

Return the bounded retention bucket key for a log level name.

## Signature

```python
retention_bucket_for_level(
    level: str,
) -> str
```

---

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