code: def test_positional_embedding():
      pos_embed = PositionalEmbedding(method="sinusoidal", units=128)
      assert isinstance(pos_embed._embed, SinusoidalPositionalEmbedding)
      pos_embed = PositionalEmbedding(method="learned", units=128)
      assert isinstance(pos_embed._embed, LearnedPositionalEmbedding)
  
file_path: gluon-nlp/tests/test_layers.py
imports: import pytest
  import numpy
  from numpy.testing import assert_allclose
  import mxnet
  from gluonnlp.layers import PositionalEmbedding, SinusoidalPositionalEmbedding, LearnedPositionalEmbedding, BucketPositionalEmbedding, AdaptiveEmbedding, ProjectedAdaptiveLogSoftmaxWithLoss, get_activation, get_norm_layer
  from gluonnlp.op import relative_position_bucket
label_desc: Use image node_id 2 for calling a global function with example usage: test_positional_embedding() without return types