docstr: Helper function to resample a test signal using core.resample().
  
  Args:
    n_before: Number of timesteps before resampling.
    n_after: Number of timesteps after resampling.
    add_endpoint: Add extra timestep at end of resampling.
    method: Method of resampling.
  
  Returns:
    before: Numpy array before resampling. Shape (n_before,).
    after: Numpy array after resampling. Shape (n_after,).
docstr_tok: ["Helper","function","to","resample","a","test","signal","using","core.resample","(",")",".","Args",":","n_before",":","Number","of","timesteps","before","resampling",".","n_after",":","Number","of","timesteps","after","resampling",".","add_endpoint",":","Add","extra","timestep","at","end","of","resampling",".","method",":","Method","of","resampling",".","Returns",":","before",":","Numpy","array","before","resampling",".","Shape","(","n_before",",",")",".","after",":","Numpy","array","after","resampling",".","Shape","(","n_after",",",")","."]
code: def create_resampled_signals(
      self, n_before, n_after, add_endpoint, method
  ):
      """Helper function to resample a test signal using core.resample().
  
      Args:
        n_before: Number of timesteps before resampling.
        n_after: Number of timesteps after resampling.
        add_endpoint: Add extra timestep at end of resampling.
        method: Method of resampling.
  
      Returns:
        before: Numpy array before resampling. Shape (n_before,).
        after: Numpy array after resampling. Shape (n_after,).
      """
      before = 1.0 - np.sin(np.linspace(0, np.pi, n_before))
      before = before[np.newaxis, :, np.newaxis]
      after = core.resample(
          before, n_after, method=method, add_endpoint=add_endpoint
      ).numpy()
      return before[0, :, 0], after[0, :, 0]
  
imports: from absl.testing import parameterized
  from ddsp import core
  import librosa
  import numpy
  from scipy import signal
  import tensorflow.compat.v2
label_desc: Use image node_id 4 for calling the ResampleTest obj's underlying member method code with example usage: obj.create_resampled_signals(n_before, n_after, add_endpoint, method) and returns: before,  after