code: def y_split_idx(request):
      sr = 8192
      y = np.ones(5 * sr)
  
      if request.param == 0:
          # Constant
          idx_true = np.asarray([[0, 5 * sr]])
  
      elif request.param == 1:
          # end-silent
          y[::2] *= -1
          y[4 * sr :] = 0
          idx_true = np.asarray([[0, 4 * sr]])
  
      elif request.param == 2:
          # begin-silent
          y[::2] *= -1
          idx_true = np.asarray([[0, 5 * sr]])
      else:
          # begin and end are silent
          y[::2] *= -1
  
          # Zero out all but two intervals
          y[:sr] = 0
          y[2 * sr : 3 * sr] = 0
          y[4 * sr :] = 0
  
          # The true non-silent intervals
          idx_true = np.asarray([[sr, 2 * sr], [3 * sr, 4 * sr]])
  
      return y, idx_true
  
imports: import warnings
  import os
  from contextlib import nullcontext
  import numpy
  import pytest
  import librosa
label_desc: Use image node_id 18 for calling a global function with example usage: y_split_idx(request) and returns: y,  idx_true