def METHOD_NAME(fortran_reader, fortran_writer,
                                     expressions):
    '''Test conversion from a SymPy expression back to PSyIR. We use the
    SymPyWriter to convert the Fortran string to a SymPy expression (we need
    a symbol table to convert from SymPy to PSyIR, which we get this way
    automatically).
    Check the conversion of indices, e.g. a Fortran `b(i)` becomes a SymPy
    `b(i,i,1)` (to support array expressions), which then needs to be
    converted back to `b(i`).
    '''
    source = f'''program test_prog
                use my_mod
                integer :: i, j
                integer :: a, b(10), c(10, 10)
                type(my_mod_type) :: d, e(10)
                x = {expressions[0]}
                end program test_prog'''
    psyir = fortran_reader.psyir_from_source(source)
    symbol_table = psyir.children[0].symbol_table
    psyir_expr = psyir.children[0].children[0].rhs
    # Convert the PSyIR expression to a string that can be parsed by SymPy
    sympy_writer = SymPyWriter()
    sympy_expr = sympy_writer(psyir_expr)
    sympy_reader = SymPyReader(sympy_writer)
    new_psyir = sympy_reader.psyir_from_expression(sympy_expr, symbol_table)
    assert fortran_writer(new_psyir) == expressions[1]