def METHOD_NAME(
    self,
    *,
    moment_0,
    moments,
    multiplicity,
    attr_data,
    cell_id,
    idx,
    length,
    rank,
    x_bins,
    x_attr,
    weighting_attribute,
    weighting_rank,
):
    assert moments.shape[0] == x_bins.shape[0] - 1
    assert moment_0.shape == moments.shape
    if weighting_rank != 0:
        raise NotImplementedError()
    self.ensure_floating_point(moment_0)
    self.ensure_floating_point(moments)
    n_cell = trtc.DVInt64(moments.shape[1])
    n_sd = trtc.DVInt64(moments.shape[0])
    d_rank = trtc.DVInt64(rank)
    n_bins = trtc.DVInt64(len(x_bins) - 1)
    moments[:] = 0
    moment_0[:] = 0
    self.__spectrum_moments_body_0.launch_n(
        length,
        (
            idx.data,
            attr_data.data,
            x_attr.data,
            moment_0.data,
            cell_id.data,
            multiplicity.data,
            x_bins.data,
            n_bins,
            moments.data,
            d_rank,
            n_sd,
            n_cell,
        ),
    )
    self.__spectrum_moments_body_1.launch_n(
        moment_0.shape[1], (n_bins, moments.data, moment_0.data, n_cell)
    )