code: def _yield_minibatches_idx(
      self, rgen, n_batches, data_ary, shuffle=True
  ):
      indices = np.arange(data_ary.shape[0])
  
      if shuffle:
          indices = rgen.permutation(indices)
      if n_batches > 1:
          remainder = data_ary.shape[0] % n_batches
  
          if remainder:
              minis = np.array_split(indices[:-remainder], n_batches)
              minis[-1] = np.concatenate(
                  (minis[-1], indices[-remainder:]), axis=0
              )
          else:
              minis = np.array_split(indices, n_batches)
  
      else:
          minis = (indices,)
  
      for idx_batch in minis:
          yield idx_batch
  
file_path: mlxtend/mlxtend/_base/_iterative_model.py
imports: from sys import stderr
  from time import time
  import numpy
label_desc: Use image node_id 5 for calling the _IterativeModel obj's underlying member method code with example usage: obj._yield_minibatches_idx(rgen, n_batches, data_ary, shuffle) without return types