code: def test_p(self):
      ss_iterator = SemiSupervisedIterator(
          self.al_dataset, p=0.1, num_steps=None, batch_size=10
      )
  
      labeled_data = []
      unlabeled_data = []
      for batch_idx, batch in enumerate(ss_iterator):
          if SemiSupervisedIterator.is_labeled(batch):
              batch = SemiSupervisedIterator.get_batch(batch)
              labeled_data.extend(batch)
          else:
              batch = SemiSupervisedIterator.get_batch(batch)
              unlabeled_data.extend(batch)
  
      total = len(labeled_data) + len(unlabeled_data)
      l_ratio = len(labeled_data) / total
      u_ratio = len(unlabeled_data) / total
      assert l_ratio < 0.15
      assert u_ratio > 0.85
  
file_path: baal/tests/utils/ssl_iterator_test.py
imports: import unittest
  import pytest
  import torch
  from torch.utils.data import Dataset, ConcatDataset
  from baal.active import ActiveLearningDataset
  from baal.utils.ssl_iterator import SemiSupervisedIterator
label_desc: Use image node_id 3 for calling the SSLDatasetTest obj's underlying member method code with example usage: obj.test_p() without return types