def is_list_of_list_of_states(self, arg):
        if arg is None:
            return False
        return all([isinstance(arg, list),
                   all(isinstance(i, list) for i in arg),
                   all((isinstance(i, tuple) for i in lst) for lst in arg)])
A list of list of states example -
dataset/ETHPy150Open pgmpy/pgmpy/pgmpy/utils/state_name.py/StateNameDecorator.is_list_of_list_of_states