code: def count_samples_in_file(file_path):
      from aubio import source
  
      hopsize = 256
      s = source(file_path, 0, hopsize)
      total_frames = 0
      while True:
          _, read = s()
          total_frames += read
          if read < hopsize:
              break
      return total_frames
  
file_path: aubio/python/tests/utils.py
imports: import os
  import re
  import glob
  import struct
  import numpy
  from tempfile import mkstemp
label_desc: Use image node_id 8 for calling a global function with example usage: count_samples_in_file(file_path) and returns: total_frames