code: def test_time_to_samples(sr):
      assert np.allclose(
          librosa.time_to_samples([0, 1, 2], sr=sr), [0, sr, 2 * sr]
      )
  
imports: import os
  import sys
  import warnings
  import librosa
  import numpy
  import pytest
label_desc: Use image node_id 4 for calling a global function with example usage: test_time_to_samples(sr) without return types