code: def test_embedder(reset):
      # creating a vector embedder with a matrix
      with pytest.raises(ValueError):
          embedder = VectorEmbedder(np.array([10, 10]), name="test")
  
      # creating a simple vector embedder
      is_training = tf.Variable(
          False,
          trainable=False,
          collections=[tf.GraphKeys.LOCAL_VARIABLES],
      )
      pre_ops = len(tf.get_default_graph().get_operations())
  
      embedder = VectorEmbedder(
          np.array([10]), name="test", is_training=is_training
      )
  
      # make sure the ops where not created yet
      assert len(tf.get_default_graph().get_operations()) == pre_ops
  
      # call the embedder
      input_ph, output_ph = embedder()
  
      # make sure that now the ops were created
      assert len(tf.get_default_graph().get_operations()) > pre_ops
  
      # try feeding a batch of one example
      input = np.random.rand(1, 10)
      sess = tf.Session()
      sess.run(tf.global_variables_initializer())
      output = sess.run(embedder.output, {embedder.input: input})
      assert output.shape == (1, 256)
  
      # now make sure the returned placeholders behave the same
      output = sess.run(output_ph, {input_ph: input})
      assert output.shape == (1, 256)
  
      # make sure the naming is correct
      assert embedder.get_name() == "test"
  
file_path: coach/rl_coach/tests/architectures/tensorflow_components/embedders/test_vector_embedder.py
imports: import os
  import sys
  import pytest
  import numpy
  from rl_coach.architectures.tensorflow_components.embedders.vector_embedder import VectorEmbedder, EmbedderScheme
  import tensorflow
  from tensorflow import logging
label_desc: Use image node_id 2 for calling a global function with example usage: test_embedder(reset) without return types