code: def run_encoder_against_random_embeddings(self, do_layer_norm):
      encoder = CnnHighwayEncoder(
          activation="relu",
          embedding_dim=4,
          filters=[[1, 4], [2, 8], [3, 16], [4, 32], [5, 64]],
          num_highway=2,
          projection_dim=16,
          projection_location="after_cnn",
          do_layer_norm=do_layer_norm,
      )
      encoder = TimeDistributed(encoder)
  
      embedding = torch.from_numpy(np.random.randn(5, 6, 50, 4)).float()
      mask = torch.ones(5, 6, 50).bool()
      token_embedding = encoder(embedding, mask)
  
      assert list(token_embedding.size()) == [5, 6, 16]
  
file_path: allennlp/tests/modules/seq2vec_encoders/cnn_highway_encoder_test.py
imports: import numpy
  import torch
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.modules.seq2vec_encoders.cnn_highway_encoder import CnnHighwayEncoder
  from allennlp.modules.time_distributed import TimeDistributed
label_desc: Use image node_id 1 for calling the TestCnnHighwayEncoder obj's underlying member method code with example usage: obj.run_encoder_against_random_embeddings(do_layer_norm) without return types