code: def __init__(
      self,
      device,
      batch_size,
      iterator,
      nfilter,
      sample_rate,
      freq_low,
      freq_high,
      normalize,
      mel_formula,
      layout="ft",
      num_threads=1,
      device_id=0,
      func=mel_fbank_func,
  ):
      super(MelFilterBankPythonPipeline, self).__init__(
          batch_size,
          num_threads,
          device_id,
          seed=12345,
          exec_async=False,
          exec_pipelined=False,
      )
      self.device = "cpu"
      self.iterator = iterator
      self.inputs = ops.ExternalSource()
  
      function = partial(
          func,
          nfilter,
          sample_rate,
          freq_low,
          freq_high,
          normalize,
          mel_formula,
      )
      self.mel_fbank = ops.PythonFunction(function=function)
      self.layout = layout
      self.freq_major = layout.find("f") != len(layout) - 1
      self.need_transpose = not self.freq_major and len(layout) > 1
      if self.need_transpose:
          perm = [i for i in range(len(layout))]
          f = layout.find("f")
          perm[f] = len(layout) - 2
          perm[-2] = f
          self.transpose = ops.Transpose(perm=perm)
  
imports: from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.ops
  import numpy
  from functools import partial
  from test_utils import compare_pipelines
  from test_utils import RandomlyShapedDataIterator
  import librosa
label_desc: Use image node_id 1 to create a new MelFilterBankPythonPipeline object from inherited base classes: Pipeline with example: obj = MelFilterBankPythonPipeline(device, batch_size, iterator, nfilter, sample_rate, freq_low, freq_high, normalize, mel_formula, layout, num_threads, device_id, func)