def perform_frame_assertions(test_case_id, frame_index):
    """Grab and perform frame assertion for given case and frame index.

    We don't need to check for the existence of the map cause this is done
    in a previous step during playback.
    """
    ### reference dict for stats
    case_stats = _TEST_CASES_STATS[test_case_id]

    ### get special callable for storing results of individual assertions
    ### taking frame into consideration

    assertion_result_appender = (
        _get_appender_with_frame(
            frame_index,
            case_stats['assertions_result_triplets'].append
        )
    )

    ### grab test callable for the given frame

    test_callable = (

        ## grab test module

        (
            getattr(

                testcases,
                'stc' + format(test_case_id, ID_FORMAT_SPEC)

            )
        )

        ## then its map which references frame assertion callables
        .FRAME_ASSERTION_MAP

        ## and finally the test callable using the index as a key
        [frame_index]

    )

    ### try performing the test

    try:
        test_callable(assertion_result_appender)

    ## store error, if it occurs

    except Exception as err:

        if 'errors' in case_stats:
            case_states['errors'].append(str(err))

        else:

            case_stats['errors'] = [str(err)]
            case_stats['result'] = 'error'
Grab and perform frame assertion for given case and frame index.

    We don't need to check for the existence of the map cause this is done
    in a previous step during playback.
    
nodezator/systemtesting/playsupport.py