code: def preemph_func(border, coeff, signal):
      in_shape = signal.shape
      assert len(in_shape) == 1  # 1D
      out = np.copy(signal)
      # nothing to do for border == 'zero'
      if border == "clamp":
          out[0] -= coeff * signal[0]
      elif border == "reflect":
          out[0] -= coeff * signal[1]
      out[1:] -= coeff * signal[0 : in_shape[0] - 1]
      return out
  
file_path: DALI/dali/test/python/operator_2/test_preemph.py
imports: from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.ops
  import nvidia.dali.fn
  import numpy
  from functools import partial
  from test_utils import compare_pipelines
  from test_utils import RandomlyShapedDataIterator
label_desc: Use image node_id 1 for calling a global function with example usage: preemph_func(border, coeff, signal) and returns: out