def row_to_nested_dict(
    headers: Iterable[Sequence[str]], row: Iterable[Any]
) -> dict[str, Any]:
    """Converts a row to a nested dict based on the provided headers."""
    result: dict[str, Any] = {}
    for h, v in zip(headers, row):
        nested_dict_path_set(result, h, v)
    return result
Converts a row to a nested dict based on the provided headers.
src/datachain/utils.py