code: def test_learn_transform():
      """
      Assert that learn_one and transform_one methods returns waited output.
      """
  
      lda = preprocessing.LDA(
          n_components=2,
          number_of_documents=60,
          vocab_prune_interval=2,
          maximum_size_vocabulary=3,
          seed=42,
      )
      components_list = []
  
      for document in DOC_SET:
          tokens = {token: 1 for token in document.split(" ")}
          lda.learn_one(x=tokens)
  
          components_list.append(lda.transform_one(x=tokens))
  
      for index, component in enumerate(components_list):
          assert np.array_equal(
              a1=list(component.values()),
              a2=REFERENCE_LEARN_ONE_PREDICT_ONE[index],
          )
  
file_path: river/river/preprocessing/test_lda.py
imports: from __future__ import annotations
  import numpy
  from river import preprocessing
label_desc: Use image node_id 6 for calling a global function with example usage: test_learn_transform() without return types