def METHOD_NAME(meas: Measurement, array: DataArray) -> int:
    assert array.shape is not None
    dims = len(array.shape)
    assert array.array_id is not None
    if dims == 2:
        outer_data = np.empty(
            array.shape[1]  # pyright: ignore[reportGeneralTypeIssues]
        )
        with meas.run() as datasaver:
            for index1, i in enumerate(array.set_arrays[0]):
                outer_data[:] = i
                datasaver.add_result((array.set_arrays[0].array_id, outer_data),
                                     (array.set_arrays[1].array_id, array.set_arrays[1][index1, :]),
                                     (array.array_id, array[index1, :]))
    elif dims == 1:
        with meas.run() as datasaver:
            for index, i in enumerate(array.set_arrays[0]):
                datasaver.add_result((array.set_arrays[0].array_id, i),
                                     (array.array_id, array[index]))
    else:
        raise NotImplementedError('The exporter only currently handles 1 and 2 Dimentional data')
    return datasaver.run_id