def METHOD_NAME(expression, correct, fortran_reader):
    '''Tests that getting the indices of an array expressions
    works as expected.
    '''
    source = f'''program test
                 use my_mod, only: my_type
                 type(my_type) :: dv(10)
                 integer i, j, k, l
                 integer, parameter :: n=10
                 real, dimension(n) :: a1
                 real, dimension(n,n) :: a2
                 real, dimension(n,n,n) :: a3
                 {expression} = 1
                 end program test'''
    psyir = fortran_reader.psyir_from_source(source)
    assign = psyir.children[0].children[0]
    # Get all access info for the expression
    access_info = VariablesAccessInfo(assign)
    # Find the access that is not to i,j, or k --> this must be
    # the 'main' array variable we need to check for:
    sig = None
    loop_vars = set(["i", "j", "k"])
    for sig in access_info:
        if str(sig) not in loop_vars:
            break
    # Get all accesses to the array variable. It has only one
    # access
    access = access_info[sig][0]
    result = access.component_indices.get_subscripts_of(loop_vars)
    assert result == correct