def _check_loop_until(self, ret_list, loop_until=None):
    """
        checks if loop until and returns the index of the action
        that its results matches the loop_until values (passed/failed)
    """

    if not loop_until:
        return None
    # Considering that multiple actions might be looped over this
    # looks for the first pass/fail of the actions and check if it
    # equals loop_until then breaks the loop
    for index_, action_output in enumerate(ret_list):
        if str(ret_list[index_]['step_result']) == loop_until.lower():
            return index_