code: def test_blocks_to_time(blocks, block_length, hop_length, sr):
      times = librosa.blocks_to_time(
          blocks,
          block_length=block_length,
          hop_length=hop_length,
          sr=sr,
      )
  
      # Check shape
      assert times.ndim == np.asarray(blocks).ndim
      assert times.size == np.asarray(blocks).size
  
      # Check values
      assert np.allclose(
          times,
          np.asanyarray(blocks) * hop_length * block_length / float(sr),
      )
  
      # Check dtype
      assert np.issubdtype(times.dtype, float)
  
imports: import os
  import sys
  import warnings
  import librosa
  import numpy
  import pytest
label_desc: Use image node_id 38 for calling a global function with example usage: test_blocks_to_time(blocks, block_length, hop_length, sr) without return types