code: def test_sparse_random_projector_size():
      dataset = datasets.TrumpApproval()
      projector = preprocessing.SparseRandomProjector(
          n_components=3, density=0.5
      )
  
      for x, y in dataset:
          projector.transform_one(x)
          break
  
      n_weights = sum(
          len(v) for v in projector._projection_matrix.values()
      )
      assert n_weights < len(x) * projector.n_components
  
imports: from __future__ import annotations
  import numpy
  from river import datasets, preprocessing
label_desc: Use image node_id 3 for calling a global function with example usage: test_sparse_random_projector_size() without return types