def _get_material_sets(cell_sets):
    """Get the cell sets that are materials."""
    material_names = []
    material_cells = []
    if cell_sets:
        set_names = list(cell_sets.keys())
        for set_name in set_names:
            if "MATERIAL" in set_name.upper():
                material_names.append(set_name.replace(" ", "_").upper())
                material_cells.append(cell_sets.pop(set_name))

    return material_names, material_cells