code: def create_lowpass_filter(
      band_center=0.5, kernelLength=256, transitionBandwidth=0.03
  ):
      """
      Calculate the highest frequency we need to preserve and the lowest frequency we allow
      to pass through.
      Note that frequency is on a scale from 0 to 1 where 0 is 0 and 1 is Nyquist frequency of
      the signal BEFORE downsampling.
      """
  
      # transitionBandwidth = 0.03
      passbandMax = band_center / (1 + transitionBandwidth)
      stopbandMin = band_center * (1 + transitionBandwidth)
  
      # Unlike the filter tool we used online yesterday, this tool does
      # not allow us to specify how closely the filter matches our
      # specifications. Instead, we specify the length of the kernel.
      # The longer the kernel is, the more precisely it will match.
      # kernelLength = 256
  
      # We specify a list of key frequencies for which we will require
      # that the filter match a specific output gain.
      # From [0.0 to passbandMax] is the frequency range we want to keep
      # untouched and [stopbandMin, 1.0] is the range we want to remove
      keyFrequencies = [0.0, passbandMax, stopbandMin, 1.0]
  
      # We specify a list of output gains to correspond to the key
      # frequencies listed above.
      # The first two gains are 1.0 because they correspond to the first
      # two key frequencies. the second two are 0.0 because they
      # correspond to the stopband frequencies
      gainAtKeyFrequencies = [1.0, 1.0, 0.0, 0.0]
  
      # This command produces the filter kernel coefficients
      filterKernel = signal.firwin2(
          kernelLength, keyFrequencies, gainAtKeyFrequencies
      )
  
      return filterKernel.astype(np.float32)
  
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 18 for calling a global function with example usage: create_lowpass_filter(band_center, kernelLength, transitionBandwidth) and returns: filterKernel