code: def read_from_source(self, f):
      total_frames = 0
      while True:
          samples, read = f.do_multi()
          total_frames += read
          if read < f.hop_size:
              assert_equal(samples[:, read:], 0)
              break
      if _debug:
          result_str = "read {:.2f}s ({:d} frames in {:d} channels"
          result_str += " and {:d} blocks at {:d}Hz) from {:s}"
          result_params = (
              total_frames / float(f.samplerate),
              total_frames,
              f.channels,
              int(total_frames / f.hop_size),
              f.samplerate,
              f.uri,
          )
          print(result_str.format(*result_params))
      return total_frames
  
imports: from numpy.testing import TestCase, assert_equal
  from aubio import source
  from utils import list_all_sounds, parse_file_samplerate
  import unittest
  from _tools import assert_raises, assert_equal, assert_warns
  from _tools import parametrize, skipTest
label_desc: Use image node_id 1 for calling the Test_aubio_source_readmulti obj's underlying member method code with example usage: obj.read_from_source(f) and returns: total_frames