def make_stat_maps(model, contrasts):
    """ Given a model and contrasts, return the corresponding z-maps

    Parameters
    ----------
    model: FirstLevelModel or SecondLevelModel object
        Must have a fitted design matrix(ces).

    contrasts: Dict[str, ndarray or str]
        Dict of contrasts for a first or second level model.
        Corresponds to the contrast_def for the FirstLevelModel
        (nilearn.stats.first_level_model.FirstLevelModel.compute_contrast)
        & second_level_contrast for a SecondLevelModel
        (nilearn.stats.second_level_model.SecondLevelModel.compute_contrast)

    Returns
    -------
    statistical_maps: Dict[str, niimg]
        Dict of statistical z-maps keyed to contrast names/titles.

    See Also
    --------
    nilearn.stats.first_level_model.FirstLevelModel.compute_contrast
    nilearn.stats.second_level_model.SecondLevelModel.compute_contrast
    """
    statistical_maps = {contrast_id: model.compute_contrast(contrast_val)
                        for contrast_id, contrast_val in contrasts.items()
                        }
    return statistical_maps