code: def test_add_embedding():
      def check_add_embedding(
          embedding, images=None, labels=None, global_step=None
      ):
          with SummaryWriter(logdir=_LOGDIR) as sw:
              sw.add_embedding(
                  tag="test_add_embedding",
                  embedding=embedding,
                  labels=labels,
                  images=images,
                  global_step=global_step,
              )
          check_and_remove_for_embedding(
              "test_add_embedding",
              images=images,
              labels=labels,
              global_step=global_step,
          )
  
      batch_size = 10
      embedding = mx.nd.uniform(shape=(batch_size, 20))
      labels = mx.nd.uniform(low=1, high=2, shape=(batch_size,)).astype(
          "int32"
      )
      images = mx.nd.uniform(shape=(batch_size, 3, 10, 10))
      global_step = np.random.randint(low=0, high=999999)
  
      check_add_embedding(
          embedding,
          labels=labels,
          images=images,
          global_step=global_step,
      )
      check_add_embedding(
          embedding.asnumpy(),
          labels=labels,
          images=images,
          global_step=global_step,
      )
      check_add_embedding(
          embedding,
          labels=labels.asnumpy(),
          images=images,
          global_step=global_step,
      )
      check_add_embedding(
          embedding,
          labels=labels.asnumpy(),
          images=images.asnumpy(),
          global_step=global_step,
      )
      check_add_embedding(
          embedding,
          labels=labels.asnumpy().tolist(),
          images=images,
          global_step=global_step,
      )
      check_add_embedding(
          embedding, images=images, global_step=global_step
      )
      check_add_embedding(
          embedding, labels=labels, global_step=global_step
      )
      check_add_embedding(
          embedding, labels=labels.asnumpy(), global_step=global_step
      )
      check_add_embedding(
          embedding,
          labels=labels.asnumpy().tolist(),
          global_step=global_step,
      )
      check_add_embedding(embedding, global_step=global_step)
      check_add_embedding(embedding)
  
imports: import shutil
  from mxboard import SummaryWriter
  from mxboard.utils import _make_metadata_tsv, make_image_grid, _make_sprite_image
  from mxboard.utils import _add_embedding_config, _save_embedding_tsv, _get_embedding_dir
  from mxboard.summary import _get_nodes_from_symbol, _net2pb
  from mxboard.proto.node_def_pb2 import NodeDef
  from mxboard.proto.attr_value_pb2 import AttrValue
  from mxboard.proto.graph_pb2 import GraphDef
  from mxboard.proto.versions_pb2 import VersionDef
  from mxnet.test_utils import *
  from mxnet.gluon import nn
  import mxnet
  from common import with_seed, setup_module
  from nose.tools import make_decorator
label_desc: Use image node_id 27 for calling a global function with example usage: test_add_embedding() without return types