<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def do_action_to_analyses(analysis_request, transition_id, all_analyses=False):
 """Cascades the transition to the analysis request analyses. If all_analyses is set to True, the transition will be triggered for all analyses of this analysis request, those from the descendant partitions included. """

    analyses = list()
    if all_analyses:
        analyses = analysis_request.getAnalyses(full_objects=True)
    else:
        analyses = analysis_request.objectValues("Analysis")
    for analysis in analyses:
        do_action_for(analysis, transition_id)