code: def kaiser_beta(a):
      """Compute the Kaiser parameter `beta`, given the attenuation `a`.
  
      Parameters
      ----------
      a : float
          The desired attenuation in the stopband and maximum ripple in
          the passband, in dB.  This should be a *positive* number.
  
      Returns
      -------
      beta : float
          The `beta` parameter to be used in the formula for a Kaiser window.
  
      References
      ----------
      Oppenheim, Schafer, "Discrete-Time Signal Processing", p.475-476.
  
      Examples
      --------
      Suppose we want to design a lowpass filter, with 65 dB attenuation
      in the stop band.  The Kaiser window parameter to be used in the
      window method is computed by ``kaiser_beta(65)``:
  
      >>> from scipy.signal import kaiser_beta
      >>> kaiser_beta(65)
      6.20426
  
      """
      if a > 50:
          beta = 0.1102 * (a - 8.7)
      elif a > 21:
          beta = 0.5842 * (a - 21) ** 0.4 + 0.07886 * (a - 21)
      else:
          beta = 0.0
      return beta
  
file_path: scipy/scipy/signal/_fir_filter_design.py
imports: from math import ceil, log
  import operator
  import warnings
  import numpy
  from numpy.fft import irfft, fft, ifft
  from scipy.special import sinc
  from scipy.linalg import toeplitz, hankel, solve, LinAlgError, LinAlgWarning, lstsq
  from scipy._lib.deprecation import _NoValue, _deprecate_positional_args
  from .None import _sigtools
label_desc: Use image node_id 2 for calling a global function with example usage: kaiser_beta(a) and returns: beta