from typing import List
from typing import Dict
from typing import Any


def _create_action_list(
    trial_list: List[List[Dict[str, Any]]]
) -> List[List[str]]:
    """Create and return the MCS scene's action list using the given trial
    list from the JSON file data."""
    action_list = []
    for index in range(0, len(trial_list)):
        # Add 1 for the EndHabituation action step at the end of the trial.
        total_steps = len(trial_list[index]) + 1
        print(f'Trial={index+1} Frames={len(trial_list[index])} Steps='
              f'{total_steps}')
        action_list.extend([['Pass']] * (total_steps - 1))
        action_list.append(['EndHabituation'])
    # Remove the EndHabituation action from the last test trial.
    return action_list[:-1]