code: def test_subset_index_is_fitted():
      """[Base] BlendIndex: check fit methods."""
      attrs = ["n_samples", "n_test_samples"]
  
      idx = SubsetIndex()
      for attr in attrs:
          assert not getattr(idx, attr)
      idx.fit(X)
      for attr in attrs:
          assert getattr(idx, attr)
  
      idx = SubsetIndex()
      for attr in attrs:
          assert not getattr(idx, attr)
      for _ in idx.generate(X):
          pass
      for attr in attrs:
          assert getattr(idx, attr)
  
      idx = SubsetIndex(X=X)
      for attr in attrs:
          assert getattr(idx, attr)
  
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 29 for calling a global function with example usage: test_subset_index_is_fitted() without return types