> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/datadesigner/llms.txt.
> For full documentation content, see https://docs.nvidia.com/nemo/datadesigner/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/datadesigner/_mcp/server.

# data\_designer.config.utils.misc

## Module Contents

### Functions

| Name                                                                                                          | Description                                                          |
| ------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| [`kebab_to_snake`](#data_designerconfigutilsmisckebab_to_snake)                                               | None                                                                 |
| [`template_error_handler`](#data_designerconfigutilsmisctemplate_error_handler)                               | None                                                                 |
| [`assert_valid_jinja2_template`](#data_designerconfigutilsmiscassert_valid_jinja2_template)                   | Raises an error if the template cannot be parsed.                    |
| [`is_notebook_environment`](#data_designerconfigutilsmiscis_notebook_environment)                             | Returns True if running inside a Jupyter/IPython notebook.           |
| [`can_run_data_designer_locally`](#data_designerconfigutilsmisccan_run_data_designer_locally)                 | Returns True if Data Designer can be run locally, False otherwise.   |
| [`extract_keywords_from_jinja2_template`](#data_designerconfigutilsmiscextract_keywords_from_jinja2_template) | Extract all keywords from a valid Jinja2 template.                   |
| [`json_indent_list_of_strings`](#data_designerconfigutilsmiscjson_indent_list_of_strings)                     | Convert a list of column names to a JSON string if the list is long. |

### Data

[`REPR_LIST_LENGTH_USE_JSON`](#data_designerconfigutilsmiscrepr_list_length_use_json)

### API

```python
REPR_LIST_LENGTH_USE_JSON = 4
```

```python
data_designer.config.utils.misc.kebab_to_snake(s: str) -> str
```

```python
data_designer.config.utils.misc.template_error_handler()
```

```python
data_designer.config.utils.misc.assert_valid_jinja2_template(template: str) -> None
```

Raises an error if the template cannot be parsed.

```python
data_designer.config.utils.misc.is_notebook_environment() -> bool
```

Returns True if running inside a Jupyter/IPython notebook.

```python
data_designer.config.utils.misc.can_run_data_designer_locally() -> bool
```

Returns True if Data Designer can be run locally, False otherwise.

```python
data_designer.config.utils.misc.extract_keywords_from_jinja2_template(template: str) -> set[str]
```

Extract all keywords from a valid Jinja2 template.

```python
data_designer.config.utils.misc.json_indent_list_of_strings(
    column_names: list[str],
    *,
    indent: int | str | None = None
) -> list[str] | str | None
```

Convert a list of column names to a JSON string if the list is long.

This function helps keep Data Designer's **repr** output clean and readable.

**Parameters:**

List of column names.

Indentation for the JSON string.

**Returns:**

`list[str] | str | None`

A list of column names or a JSON string if the list is long.