def model_similarity(model, groups=[]):
    (ds_pairs, ds_info) = psiz.utils.pairwise_index_dataset(model.n_stimuli, mask_zero=True, groups=groups)
    simmat = psiz.utils.pairwise_similarity(model.stimuli, model.kernel, ds_pairs, use_group_kernel=True).numpy()
    return simmat
def model_similarity(model, groups=[]):
    (ds_pairs, ds_info) = psiz.utils.pairwise_index_dataset(model.n_stimuli, mask_zero=True, groups=groups)
    simmat = psiz.utils.pairwise_similarity(model.stimuli, model.kernel, ds_pairs, use_group_kernel=True).numpy()
    return simmat