code: def test_replace_one_repeat_near_end(self):
      augment = RepeatPart(
          mode="replace", crossfade_duration=0.0, p=1.0
      )
      augment.parameters = {
          "should_apply": True,
          "part_num_samples": 3,
          "repeats": 1,
          "part_start_index": 7,
      }
      augment.freeze_parameters()
  
      for ndim in (1, 2):
          samples = np.array(
              [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0],
              dtype=np.float32,
          )
          samples = adapt_ndim(samples, ndim)
          processed_samples = augment(samples=samples, sample_rate=4000)
          target_samples = np.array(
              [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.7],
              dtype=np.float32,
          )
          target_samples = adapt_ndim(target_samples, ndim)
          assert_array_almost_equal(processed_samples, target_samples)
          assert processed_samples.shape == samples.shape
          assert processed_samples.dtype == np.float32
  
imports: from copy import deepcopy
  import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  from audiomentations import Gain, AdjustDuration, RepeatPart, Shift
  from audiomentations.core.utils import get_crossfade_mask_pair
  from tests.test_filter_transforms import get_chirp_test
label_desc: Use image node_id 4 for calling the TestRepeatPart obj's underlying member method code with example usage: obj.test_replace_one_repeat_near_end() without return types