How about:
```python
_path_segments_doc = path_segments.__doc__
```
or similar? As you kept a reference to the entire function I was expecting you to use it.