code: def early_downsample_count(
      nyquist, filter_cutoff, hop_length, n_octaves
  ):
      """Compute the number of early downsampling operations"""
  
      downsample_count1 = max(
          0,
          int(np.ceil(np.log2(0.85 * nyquist / filter_cutoff)) - 1) - 1,
      )
      # print("downsample_count1 = ", downsample_count1)
      num_twos = nextpow2(hop_length)
      downsample_count2 = max(0, num_twos - n_octaves + 1)
      # print("downsample_count2 = ",downsample_count2)
  
      return min(downsample_count1, downsample_count2)
  
imports: import sys
  import torch
  from torch.nn.functional import conv1d, fold
  import numpy
  from time import time
  import math
  from scipy.signal import get_window
  from scipy import signal
  from scipy.fftpack import fft
  import warnings
  from nnAudio.librosa_functions import *
label_desc: Use image node_id 21 for calling a global function with example usage: early_downsample_count(nyquist, filter_cutoff, hop_length, n_octaves) and returns: min