code: def diff_feature(feat, nd=1):
      diff = feat[1:] - feat[:-1]
      feat = feat[1:]
      if nd == 1:
          return np.concatenate((feat, diff), axis=1)
      elif nd == 2:
          d2 = diff[1:] - diff[:-1]
          return np.concatenate((feat[1:], diff[1:], d2), axis=1)
  
imports: import argparse
  import numpy
  import os
  import string
  import bob.ap
  import scipy.io.wavfile
  from tensorpack.dataflow import DataFlow, LMDBSerializer
  from tensorpack.utils import fs, logger, serialize, get_tqdm
  from tensorpack.utils.argtools import memoized
  from tensorpack.utils.stats import OnlineMoments
label_desc: Use image node_id 4 for calling a global function with example usage: diff_feature(feat, nd) and returns: np, np