code: def test_temp_array_shape():
      """[Base] TemporalIndex: test the array shape on generation."""
      tr1, te1 = np.array([0]), np.array([1])
      tr2, te2 = np.array([0, 1]), np.array([2])
      tr3, te3 = np.array([0, 1, 2]), np.array([3])
      tr4, te4 = np.array([0, 1, 2, 3]), np.array([4])
      trs = [tr1, tr2, tr3, tr4]
      tes = [te1, te2, te3, te4]
  
      for i, (tri, tei) in enumerate(
          TemporalIndex(X=X).generate(as_array=True)
      ):
          np.testing.assert_array_equal(tri, trs[i])
          np.testing.assert_array_equal(tei, tes[i])
  
imports: import os
  import subprocess
  import numpy
  from mlens import config
  from mlens.utils import IdTrain
  from mlens.index import FoldIndex, BlendIndex, SubsetIndex, TemporalIndex, ClusteredSubsetIndex, FullIndex
  from mlens.index.base import partition, prune_train
label_desc: Use image node_id 17 for calling a global function with example usage: test_temp_array_shape() without return types