code: def test_frames_to_time(sr, hop_length, n_fft):
      # Generate frames at times 0s, 1s, 2s
      frames = np.arange(3) * sr // hop_length
  
      if n_fft:
          frames -= n_fft // (2 * hop_length)
  
      times = librosa.frames_to_time(
          frames, sr=sr, hop_length=hop_length, n_fft=n_fft
      )
  
      # we need to be within one frame
      assert np.all(
          np.abs(times - np.asarray([0, 1, 2])) * sr < hop_length
      )
  
imports: import os
  import sys
  import warnings
  import librosa
  import numpy
  import pytest
label_desc: Use image node_id 3 for calling a global function with example usage: test_frames_to_time(sr, hop_length, n_fft) without return types