def test_extract_partial_list_progress_valid():
    """Test extracting partial list progress with valid content."""
    content = '{"jokes": [{"setup": "Why did the chicken cross the road?", "punchline": "To get to the other side!"}]'
    current_show = Show(title="Comedy Show")

    from llama_index.core.program.utils import create_flexible_model

    partial_cls = create_flexible_model(Show)

    result = _extract_partial_list_progress(content, Show, current_show, partial_cls)

    if result is not None:
        assert hasattr(result, "jokes")
Test extracting partial list progress with valid content.
llama-index-core/tests/program/test_streaming_utils.py