code: def test_gensim_word2vec():
      expected_doc_2 = [
          0.0076740906,
          -0.051765148,
          -0.008963874,
          -0.16817021,
          -0.12640671,
          -0.28199115,
          -0.1418166,
          -0.08547635,
          -0.1489038,
          0.049820565,
      ]
      actual_doc_2 = Doc(TEXT_2).generate_gensim_document_embedding(
          model_uri="tests/models/gensim_test_nl.kv"
      )
      if not np.allclose(actual_doc_2, expected_doc_2):
          raise AssertionError
  
      expected_doc_5 = [
          0.04336167,
          -0.12551728,
          0.121972464,
          -0.023885678,
          -0.0892916,
          0.011041589,
          -0.022286428,
          0.06333805,
          0.07664292,
          0.086685486,
      ]
      actual_doc_5 = Doc(TEXT_5).generate_gensim_document_embedding(
          model_uri="tests/models/gensim_test_nl.kv",
          idf_weighting="naive",
      )
      if not np.allclose(actual_doc_5, expected_doc_5):
          raise AssertionError
  
      expected_doc_5 = [
          0.021136083,
          -0.035798773,
          0.032576967,
          0.0048801005,
          -0.028301004,
          -0.0059328717,
          -0.010782357,
          0.025319293,
          0.018113682,
          0.028851084,
      ]
      actual_doc_5 = Doc(TEXT_5).generate_gensim_document_embedding(
          model_uri="tests/models/gensim_test_nl.kv",
          idf_weighting="log",
      )
      if not np.allclose(actual_doc_5, expected_doc_5):
          raise AssertionError
  
imports: import re
  from unittest import mock
  import pytest
  import spacy
  import numpy
  from fakeredis import FakeRedis
  from textpipe.doc import Doc, TextpipeMissingModelException, RedisIDFWeightingMismatchException
  from textpipe.wrappers import RedisKeyedVectors
label_desc: Use image node_id 12 for calling a global function with example usage: test_gensim_word2vec() without return types