def load_jsonalyzer(
    use_async: bool = False,
    custom_jsonalyzer: Optional[Callable] = None,
) -> Callable:
    """
    Load the JSONalyzer.

    Args:
        use_async (bool): Whether to use async.
        custom_jsonalyzer (Callable): A custom JSONalyzer to use.

    Returns:
        Callable: The JSONalyzer.

    """
    if custom_jsonalyzer:
        assert not use_async or asyncio.iscoroutinefunction(custom_jsonalyzer), (
            "custom_jsonalyzer function must be async when use_async is True"
        )
        return custom_jsonalyzer
    else:
        # make mypy happy to indent this
        if use_async:
            return async_default_jsonalyzer
        else:
            return default_jsonalyzer

    Load the JSONalyzer.

    Args:
        use_async (bool): Whether to use async.
        custom_jsonalyzer (Callable): A custom JSONalyzer to use.

    Returns:
        Callable: The JSONalyzer.

    
llama-index-experimental/llama_index/experimental/query_engine/jsonalyze/jsonalyze_query_engine.py