code: def _truncate(w, needed):
      """Truncate window by 1 sample if needed for DFT-even symmetry"""
      if needed:
          return w[:-1]
      else:
          return w
  
imports: import operator
  import warnings
  import numpy
  from scipy import linalg, special, fft
label_desc: Use image node_id 3 for calling a global function with example usage: _truncate(w, needed) and returns: w, w