code: def test_icqt(
      y_icqt,
      sr_icqt,
      scale,
      hop_length,
      over_sample,
      length,
      res_type,
      dtype,
  ):
      bins_per_octave = over_sample * 12
      n_bins = 7 * bins_per_octave
  
      C = librosa.cqt(
          y_icqt,
          sr=sr_icqt,
          n_bins=n_bins,
          bins_per_octave=bins_per_octave,
          scale=scale,
          hop_length=hop_length,
      )
  
      if length:
          _len = len(y_icqt)
      else:
          _len = None
      yinv = librosa.icqt(
          C,
          sr=sr_icqt,
          scale=scale,
          hop_length=hop_length,
          bins_per_octave=bins_per_octave,
          length=_len,
          res_type=res_type,
          dtype=dtype,
      )
  
      assert yinv.dtype == dtype
  
      # Only test on the middle section
      if length:
          assert len(y_icqt) == len(yinv)
      else:
          yinv = librosa.util.fix_length(yinv, size=len(y_icqt))
  
      y_icqt = y_icqt[sr_icqt // 2 : -sr_icqt // 2]
      yinv = yinv[sr_icqt // 2 : -sr_icqt // 2]
  
      residual = np.abs(y_icqt - yinv)
      # We'll tolerate 10% RMSE
      # error is lower on more recent numpy/scipy builds
  
      resnorm = np.sqrt(np.mean(residual**2))
      assert resnorm <= 0.1, resnorm
  
imports: from __future__ import division
  import warnings
  import os
  from typing import Optional
  import librosa
  import numpy
  import scipy.stats
  import pytest
  from test_core import srand
label_desc: Use image node_id 29 for calling a global function with example usage: test_icqt(y_icqt, sr_icqt, scale, hop_length, over_sample, length, res_type, dtype) without return types