code: def test_log_timestretch(n_samples, lower, upper, jam_fixture):
      D = muda.deformers.LogspaceTimeStretch(
          n_samples=n_samples, lower=lower, upper=upper
      )
  
      jam_orig = deepcopy(jam_fixture)
  
      n_out = 0
      for jam_new in D.transform(jam_orig):
          # Verify that the original jam reference hasn't changed
          assert jam_new is not jam_fixture
          __test_time(jam_orig, jam_fixture, 1.0)
  
          # Verify that the state and history objects are intact
          __test_deformer_history(D, jam_new.sandbox.muda.history[-1])
  
          d_state = jam_new.sandbox.muda.history[-1]["state"]
          d_rate = d_state["rate"]
          assert 2.0**lower <= d_rate <= 2.0**upper
  
          __test_time(jam_orig, jam_new, d_rate)
          n_out += 1
  
      assert n_samples == n_out
      # Serialization test
      D2 = muda.deserialize(muda.serialize(D))
      __test_params(D, D2)
  
imports: from copy import deepcopy
  import re
  import six
  import numpy
  import soundfile
  import jams
  import librosa
  import muda
  import pytest
  import scipy
  from contextlib import contextmanager
label_desc: Use image node_id 11 for calling a global function with example usage: test_log_timestretch(n_samples, lower, upper, jam_fixture) without return types