"""
This type stub file was generated by pyright.
"""

from typing import Any, TYPE_CHECKING
from collections.abc import Mapping

"""Tools for working with dicts."""
if TYPE_CHECKING:
    ...
def unflatten(flat_dict: dict[Any, Any], encodings: set[str] | None = ...) -> dict[Any, Any]:
    """Converts a flat dict of key-value pairs to a spec tree.

    Example
    -------
        unflatten({
          foo_bar_baz: 123,
          foo_bar_biz: 456,
          x_bonks: 'hi',
        }, ['x'])

        # Returns:
        # {
        #   foo: {
        #     bar: {
        #       baz: 123,
        #       biz: 456,
        #     },
        #   },
        #   encoding: {  # This gets added automatically
        #     x: {
        #       bonks: 'hi'
        #     }
        #   }
        # }

    Args
    ----
    flat_dict: dict
        A flat dict where keys are fully-qualified paths separated by
        underscores.

    encodings: set
        Key names that should be automatically moved into the 'encoding' key.

    Returns
    -------
    A tree made of dicts inside of dicts.
    """
    ...

def remove_none_values(input_dict: Mapping[Any, Any]) -> dict[Any, Any]:
    """Remove all keys with None values from a dict."""
    ...

