code: def test_recursion(self):
      eager = list(range(10))
  
      li = LazyIndices(eager, offset=0)
      # TODO: speed up this test. Can we avoid checking such a high limit?
      limit = sys.getrecursionlimit() * 2 + 10
      for i in range(limit):
          li = LazyIndices(li, eager, offset=0)
  
      self.assertEqual(len(eager) * (i + 2), len(li))
      for el in li:  # keep this to check recursion error
          pass
  
imports: import sys
  import unittest
  import random
  import torch
  from avalanche.benchmarks import FixedSizeExperienceSplitter
  from avalanche.benchmarks.utils import AvalancheDataset, concat_datasets
  from avalanche.benchmarks.utils.classification_dataset import TaskAwareClassificationDataset
  from avalanche.benchmarks.utils.flat_data import FlatData, _flatten_datasets_and_reindex, LazyIndices
  from avalanche.benchmarks.utils.flat_data import _flatdata_depth, _flatdata_print
  from avalanche.training import ReservoirSamplingBuffer
  from tests.unit_tests_utils import get_fast_benchmark
label_desc: Use image node_id 2 for calling the LazyIndicesTests obj's underlying member method code with example usage: obj.test_recursion() without return types