code: def test_id_train():
      """[Base] Test IdTrain class for checking training and test matrices."""
      id_train = IdTrain(size=5)
      id_train.fit(X)
  
      assert id_train.is_train(X)
      assert not id_train.is_train(np.random.permutation(X))
      assert not id_train.is_train(X[:3, :])
  
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 4 for calling a global function with example usage: test_id_train() without return types