code: def _create_sequence_from_ndarray(data, num_seq, batch_size):
      if num_seq == 1:
          return NumpySequence(data, batch_size)
  
      nrow = data.shape[0]
      seqs = []
      seq_size = nrow // num_seq
      for start in range(0, nrow, seq_size):
          end = min(start + seq_size, nrow)
          seq = NumpySequence(data[start:end], batch_size)
          seqs.append(seq)
      return seqs
  
imports: import filecmp
  import numbers
  import re
  from copy import deepcopy
  from os import getenv
  from pathlib import Path
  import numpy
  import pytest
  from scipy import sparse
  from sklearn.datasets import dump_svmlight_file, load_svmlight_file
  from sklearn.model_selection import train_test_split
  import lightgbm
  from lightgbm.compat import PANDAS_INSTALLED, pd_DataFrame, pd_Series
  from .utils import dummy_obj, load_breast_cancer, mse_obj, np_assert_array_equal
label_desc: Use image node_id 2 for calling a global function with example usage: _create_sequence_from_ndarray(data, num_seq, batch_size) and returns: seqs, NumpySequence