def _toggle_experiment_group_collapsable(last_show_click, last_hide_click):
    """The callback to show and collapse each group.

    Also toggles the show/hide buttons. Triggered when the show or
    hide button is clicked.
    """
    last_show_click = last_show_click if last_show_click else 0
    last_hide_click = last_hide_click if last_hide_click else 0

    # "show" is clicked: open collabsable, hide "show" button & un-hide "hide" button
    if int(last_show_click) > int(last_hide_click):
        return True, True, False
    # "hide" is clicked: close collabsable, un-hide "show" button & hide "hide" button
    elif int(last_hide_click) > int(last_show_click):
        return False, False, True
    # nothing yet is clicked: return default states
    else:
        return False, False, True