def METHOD_NAME(x, signal_ndim, normalized):
    from nbla_test_utils import convert_to_float2_array, convert_to_complex_array
    x_data_complex = convert_to_complex_array(x)
    batch_dims = x_data_complex.shape[0:len(
        x_data_complex.shape) - signal_ndim]
    ref_data_complex = np.fft.fftn(x_data_complex,
                                   axes=np.arange(signal_ndim) +
                                   len(batch_dims),
                                   norm="ortho" if normalized else None)
    ref_data_float2 = convert_to_float2_array(
        ref_data_complex).astype(np.float32)
    return ref_data_float2