class_docstr: Tests embedding related operations.
      
docstr: Tests the load_word2vec function.
          
code: def test_load_word2vec(self):
      """Tests the load_word2vec function."""
      header = "2 3"
      words = ["word", "词"]
      vec = np.array([1.2, 3.4, 5.6], dtype="float32")
      w2v_file = tempfile.NamedTemporaryFile()
      w2v_file.write(tf.compat.as_bytes(header + "\n"))
      for word in words:
          w2v_file.write(tf.compat.as_bytes(word + " "))
          w2v_file.write(vec.tostring() + b"\n")
      w2v_file.flush()
      vocab = {"word": 0, "词": 1}
      word_vecs = np.zeros([2, 3])
  
      word_vecs = embedding.load_word2vec(
          w2v_file.name, vocab, word_vecs
      )
  
      self.assertEqual(word_vecs.shape[0], 2)
      self.assertEqual(word_vecs.shape[1], 3)
      np.testing.assert_array_equal(word_vecs[0], vec)
      np.testing.assert_array_equal(word_vecs[1], vec)
  
file_path: texar/tests/data/embedding_test.py
imports: import sys
  import tempfile
  import numpy
  import tensorflow
  from texar.tf.data import embedding
label_desc: Use image node_id 2 for calling the EmbeddingTest obj's underlying member method code with example usage: obj.test_load_word2vec() without return types