class_docstr: Tests for detr model.py.
class_docstr_tok: ["Tests","for","detr","model.py","."]
docstr: Tests QueryPosEmbedding.
docstr_tok: ["Tests","QueryPosEmbedding","."]
code: def test_query_pos_embedding(self):
      """Tests QueryPosEmbedding."""
      rng = random.PRNGKey(0)
      positional_embedding_def = model.QueryPosEmbedding(
          hidden_dim=64, num_queries=100
      )
      query_pos, _ = positional_embedding_def.init_with_output(rng)
      # test output shape
      self.assertEqual(query_pos.shape, (1, 100, 64))
  
imports: import functools
  from absl.testing import absltest
  from absl.testing import parameterized
  from flax import jax_utils
  from flax import traverse_util
  from flax.core import unfreeze
  import jax
  from jax import random
  import jax.numpy
  import ml_collections
  import numpy
  from scenic.projects.baselines.detr import model
label_desc: Use image node_id 3 for calling the DETRModulesTest obj's underlying member method code with example usage: obj.test_query_pos_embedding() without return types