code: def test_last_active_step():
      ds = ActiveLearningDataset(MyDataset(), last_active_steps=1)
      assert len(ds) == 0
      ds.label_randomly(10)
      assert len(ds) == 10
      ds.label_randomly(10)
      # We only iterate over the items labelled at step 2.
      assert len(ds) == 10
      assert all(ds.labelled_map[x] == 2 for x, _ in ds)
  
imports: import pickle
  import unittest
  import unittest.mock
  import warnings
  import datasets
  import numpy
  import pytest
  import torch.utils.data
  from torchvision.transforms import Lambda
  from baal.active import ActiveLearningDataset
label_desc: Use image node_id 6 for calling a global function with example usage: test_last_active_step() without return types