code: def test_shift_without_rollover(self):
      samples = np.array([1.0, 0.5, 0.25, 0.125], dtype=np.float32)
      sample_rate = 16000
  
      forward_augmenter = Shift(
          min_shift=0.5,
          max_shift=0.5,
          rollover=False,
          fade_duration=0.0,
          p=1.0,
      )
      forward_shifted_samples = forward_augmenter(
          samples=samples, sample_rate=sample_rate
      )
      assert_almost_equal(
          forward_shifted_samples,
          np.array([0.0, 0.0, 1.0, 0.5], dtype=np.float32),
      )
      assert forward_shifted_samples.dtype == np.float32
      assert len(forward_shifted_samples) == 4
  
      backward_augmenter = Shift(
          min_shift=-0.25,
          max_shift=-0.25,
          rollover=False,
          fade_duration=0.0,
          p=1.0,
      )
      backward_shifted_samples = backward_augmenter(
          samples=samples, sample_rate=sample_rate
      )
      assert_almost_equal(
          backward_shifted_samples,
          np.array([0.5, 0.25, 0.125, 0.0], dtype=np.float32),
      )
      assert backward_shifted_samples.dtype == np.float32
      assert len(forward_shifted_samples) == 4
  
file_path: audiomentations/tests/test_shift.py
imports: import numpy
  import pytest
  from numpy.testing import assert_almost_equal
  from audiomentations import Shift
label_desc: Use image node_id 4 for calling the TestShift obj's underlying member method code with example usage: obj.test_shift_without_rollover() without return types