code: def get_frames(signal, blocksize=2048, stepsize=None, zeropad=False):
      if stepsize is None:
          stepsize = blocksize
      if stepsize > blocksize:
          raise ValueError(
              "Stepsize must be lower or equal to blocksize"
          )
      start = 0
      signal_length = len(signal)
      eod = False
      while not eod:
          end = start + blocksize
          eod = end >= signal_length
          if eod & zeropad:
              new_shape = list(signal.shape)
              new_shape[0] = blocksize
              frame = signal[start:end].copy()
              frame.resize(tuple(new_shape))
              yield frame, eod
          else:
              yield signal[start:end], eod
          start += stepsize
  
imports: import unittest
  from unit_timeside import TestRunner
  from timeside.core.preprocessors import downmix_to_mono, frames_adapter
  import numpy
  from numpy.testing import assert_array_equal
label_desc: Use image node_id 1 for calling a global function with example usage: get_frames(signal, blocksize, stepsize, zeropad) without return types