code: def _pyfftw_destroys_input(flags, direction, halfcomplex, ndim):
      
      if any(flag in flags or _pyfftw_to_local(flag) in flags
             for flag in ('FFTW_MEASURE', 'FFTW_PATIENT', 'FFTW_EXHAUSTIVE',
                          'FFTW_DESTROY_INPUT')):
          return True
      elif (direction in ('backward', 'FFTW_BACKWARD') and halfcomplex and
            ndim != 1):
          return True
      else:
          return False
docs: Return ``True`` if FFTW destroys an input array, ``False`` otherwise.