code: def clicks(times, fs, click=None, length=None):
      
      # Create default click signal
      if click is None:
          # 1 kHz tone, 100ms
          click = np.sin(2*np.pi*np.arange(fs*.1)*1000/(1.*fs))
          # Exponential decay
          click *= np.exp(-np.arange(fs*.1)/(fs*.01))
      # Set default length
      if length is None:
          length = int(times.max()*fs + click.shape[0] + 1)
  
      # Pre-allocate click signal
      click_signal = np.zeros(length)
      # Place clicks
      for time in times:
          # Compute the boundaries of the click
          start = int(time*fs)
          end = start + click.shape[0]
          # Make sure we don't try to output past the end of the signal
          if start >= length:
              break
          if end >= length:
              click_signal[start:] = click[:length - start]
              break
          # Normally, just add a click here
          click_signal[start:end] = click
      return click_signal
docs: Returns a signal with the signal 'click' placed at each specified time
  
      Parameters
      ----------
      times : np.ndarray
          times to place clicks, in seconds
      fs : int
          desired sampling rate of the output signal
      click : np.ndarray
          click signal, defaults to a 1 kHz blip
      length : int
          desired number of samples in the output signal,
          defaults to ``times.max()*fs + click.shape[0] + 1``
  
      Returns
      -------
      click_signal : np.ndarray
          Synthesized click signal