> ## Documentation Index
> Fetch the complete documentation index at: https://www.getmaxim.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# livekit.Utils

> Utility functions and helpers for Livekit integration.

[View module source on GitHub](https://github.com/maximhq/maxim-py/blob/main/maxim/logger/livekit/utils.py)

## [SameThreadExecutor](/sdk/python/references/logger/livekit/utils)

```python theme={null}
class SameThreadExecutor(Executor)
```

A mock executor that runs submitted callables on the same thread, synchronously.
Mimics the interface of concurrent.futures.Executor.

#### get\_thread\_pool\_executor

```python theme={null}
def get_thread_pool_executor() -> ThreadPoolExecutor
```

Get the global thread pool executor for processing.

#### shutdown\_thread\_pool\_executor

```python theme={null}
def shutdown_thread_pool_executor(wait=True)
```

Shutdown the global thread pool executor.

#### start\_new\_turn

```python theme={null}
def start_new_turn(session_info: SessionStoreEntry)
```

This function will start a new turn and return the current turn.
If the current turn is interrupted or empty, it will return None.
If the current turn is not interrupted and not empty, it will return the current turn.
If the current turn is interrupted and not empty, it will return None.
If the current turn is empty, it will return None.
If the current turn is not interrupted and empty, it will return None.
If the current turn is interrupted and empty, it will return None.

**Arguments**:

| Name           | Description              |
| -------------- | ------------------------ |
| `session_info` | The session information. |

**Returns**:

The new turn or None if the current turn is interrupted or empty.
