code: def need_data(self, element, length):
      # length = length // 64
      if self.pos >= self.array.shape[0]:
          element.emit("end-of-stream")
      else:
          avalaible_sample = self.length - self.pos
          if avalaible_sample < length:
              length = avalaible_sample
          array = self.array[self.pos : self.pos + length]
          buf = Gst.Buffer.new_wrapped(array.flatten().tobytes())
  
          buf.timestamp = self.pos * self.per_sample
          buf.duration = int(length * self.per_sample)
          element.emit("push-buffer", buf)
          self.pos += length
  
imports: from __future__ import division
  import gi
  from gi.repository import GLib, Gst
  import numpy
  import scipy.signal.waveforms
  import os.path
  import ffmpeg
label_desc: Use image node_id 2 for calling the NumpySrc obj's underlying member method code with example usage: obj.need_data(element, length) without return types