def METHOD_NAME(
    self,
    nsamples,
    samples_per_iteration,
    random_state,
    index,
    dimension,
    samples_u01,
    training_points,
):
    points_to_add = min(samples_per_iteration, nsamples - index)
    self.strata.estimate_gradient(
        self.surrogate,
        self.step_size,
        nsamples,
        index,
        samples_u01,
        training_points,
        self._convert_qoi_tolist(),
    )
    strata_metrics = self.strata.calculate_gradient_strata_metrics(index)
    bins2break = self.identify_bins(
        strata_metrics=strata_metrics,
        points_to_add=points_to_add,
        random_state=random_state)
    new_points = self.strata.update_strata_and_generate_samples(
        dimension, points_to_add, bins2break, samples_u01, random_state)
    return new_points