code: def adapt_ndim(samples, ndim):
      if samples.ndim < ndim:
          samples = samples[np.newaxis, :]
      return samples
  
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 1 for calling a global function with example usage: adapt_ndim(samples, ndim) and returns: samples