code: def fingerprint(
      channel_samples: List[int],
      Fs: int = DEFAULT_FS,
      wsize: int = DEFAULT_WINDOW_SIZE,
      wratio: float = DEFAULT_OVERLAP_RATIO,
      fan_value: int = DEFAULT_FAN_VALUE,
      amp_min: int = DEFAULT_AMP_MIN,
  ) -> List[Tuple[str, int]]:
      """
      FFT the channel, log transform output, find local maxima, then return locally sensitive hashes.
  
      :param channel_samples: channel samples to fingerprint.
      :param Fs: audio sampling rate.
      :param wsize: FFT windows size.
      :param wratio: ratio by which each sequential window overlaps the last and the next window.
      :param fan_value: degree to which a fingerprint can be paired with its neighbors.
      :param amp_min: minimum amplitude in spectrogram in order to be considered a peak.
      :return: a list of hashes with their corresponding offsets.
      """
      # FFT the signal and extract frequency components
      arr2D = mlab.specgram(
          channel_samples,
          NFFT=wsize,
          Fs=Fs,
          window=mlab.window_hanning,
          noverlap=int(wsize * wratio),
      )[0]
  
      # Apply log transform since specgram function returns linear array. 0s are excluded to avoid np warning.
      arr2D = 10 * np.log10(
          arr2D, out=np.zeros_like(arr2D), where=(arr2D != 0)
      )
  
      local_maxima = get_2D_peaks(arr2D, plot=False, amp_min=amp_min)
  
      # return hashes
      return generate_hashes(local_maxima, fan_value=fan_value)
  
file_path: dejavu/dejavu/logic/fingerprint.py
imports: import hashlib
  from operator import itemgetter
  from typing import List, Tuple
  import matplotlib.mlab
  import matplotlib.pyplot
  import numpy
  from scipy.ndimage.filters import maximum_filter
  from scipy.ndimage.morphology import binary_erosion, generate_binary_structure, iterate_structure
  from dejavu.config.settings import CONNECTIVITY_MASK, DEFAULT_AMP_MIN, DEFAULT_FAN_VALUE, DEFAULT_FS, DEFAULT_OVERLAP_RATIO, DEFAULT_WINDOW_SIZE, FINGERPRINT_REDUCTION, MAX_HASH_TIME_DELTA, MIN_HASH_TIME_DELTA, PEAK_NEIGHBORHOOD_SIZE, PEAK_SORT
label_desc: Use image node_id 1 for calling a global function with example usage: fingerprint(channel_samples, Fs, wsize, wratio, fan_value, amp_min) and returns: generate_hashes