# prov.trace.guard

prov.trace.guard in Python SDK. Wrap `fn` so it only sees a completion the account's Trace rules let through.

## Signature

```python
prov.trace.guard(fn: Any, thresholds: Optional[dict] = …, session: Optional[dict] = …, preflight: Optional[bool] = …, predict: Optional[list] = …) -> Any
```

## Parameters

- `fn` (Any)
- `thresholds` (Optional[dict], optional)
- `session` (Optional[dict], optional)
- `preflight` (Optional[bool], optional)
- `predict` (Optional[list], optional)

## Returns

`Any`

Runs locally, with no request to the API.
