from typing import List
from typing import Any


def _check_nested_list_consistency(query: List[List[Any]]) -> bool:
    """
    Return True if all input lists have same nested list
    structure. e.g. ['item'] != [['item']]

    Args:
        query:
            Nested lists to check for consistency.

    Returns:
        True if diagnostic query lists have same nested list
        structure, else returns False.

    """

    def _checker(lists):
        """Return True if all input lists have same nested list
        structure. e.g. ['item'] != [['item']]."""
        type_set = set(map(type, lists))
        if list in type_set:
            return (
                len(type_set) == 1
                and len(set(map(len, lists))) == 1
                and all(map(_checker, zip(*lists)))
            )
        return True

    return _checker(query)