def collect_3d(dict_syst_matr):
    """
    Takes a dict of system matrices in, and returns a list of the matrix names
    which are in 3D. Used in the Kalman recursions to be able for the functions 
    to work on time-varying system matrices as well as constant system matrices.

    Parameters
    ----------
    dict_syst_matr : dict
        dict with all system matrices.

    Returns
    -------
    list_3d : list
        list of system matrices in 3D.

    """
    
    list_3d = list()
    for key in dict_syst_matr.keys():
        if len(dict_syst_matr[key].shape) >2:
            list_3d.append(key)
    return list_3d