code: def irnn_data_iterator(X, y, batch_size, math_engine):
      """Slices numpy arrays into batches and wraps them in blobs"""
  
      def make_blob(data, math_engine):
          """Wraps numpy data into neoml blob"""
          shape = data.shape
          if len(shape) == 2:  # data
              # Wrap 2-D array into blob of (BatchWidth, Channels) shape
              return neoml.Blob.asblob(
                  math_engine, data, (1, shape[0], 1, 1, 1, 1, shape[1])
              )
          elif len(shape) == 1:  # dense labels
              # Wrap 1-D array into blob of (BatchWidth,) shape
              return neoml.Blob.asblob(
                  math_engine, data, (1, shape[0], 1, 1, 1, 1, 1)
              )
          else:
              assert False
  
      start = 0
      data_size = y.shape[0]
      while start < data_size:
          yield (
              make_blob(X[start : start + batch_size], math_engine),
              make_blob(y[start : start + batch_size], math_engine),
          )
          start += batch_size
  
imports: import numpy
  import neoml
  import time
  from sklearn.datasets import fetch_openml
label_desc: Use image node_id 1 for calling a global function with example usage: irnn_data_iterator(X, y, batch_size, math_engine) and returns: neoml, neoml