def METHOD_NAME(compcor_cols_filt, confounds_json, mask):
    """Extract anat compcor components with a given mask.
    Parameters
    ----------
    compcor_cols_filt : :obj:`list`
        List of compcor components column names filtered by user
        selected CompCor strategy.
    confounds_json : :obj:`dict`
        Dictionary of confounds from the confounds.json file.
    mask : :obj:`str`
        Mask to use for acompcor.
    Returns
    -------
    compcor_cols_filt : :obj:`list`
        List of compcor components column names filtered by type of
        acompcor mask.
    """
    return [
        compcor_col
        for compcor_col in compcor_cols_filt
        if confounds_json[compcor_col]["Mask"] in mask
    ]