def METHOD_NAME(views):
    """Colorize groups by type in given views"""
    view_names = [x.Name for x in views]
    text = (
        "Do you want to colorize groups by type on these views:\n\n"
        + "\n".join(view_names)
    )
    if not forms.alert(text, yes=True, cancel=True, no=False):
        return
    groups_dict = collect_groups(views)
    groups_dict = filter_group_types(groups_dict)
    logger.debug(groups_dict)
    # prepare colors across selected views
    groups_colors = prepare_colors(groups_dict)
    logger.debug(groups_colors)
    with revit.Transaction("Colorize Group Type"):
        for view in views:
            # apply overrides to each view
            colorize_grouptypes_in_view(view, groups_colors)