code: def test_cnn_encoder():
      num_embeddings, embedding_dim = 64, 128
      sequence_length = 85
      num_filters = 32
      filter_length = 8
      cnn_encoder = CNNEncoder(
          num_embeddings=num_embeddings,
          embedding_dim=embedding_dim,
          sequence_length=sequence_length,
          num_kernels=num_filters,
          kernel_length=filter_length,
      ).eval()
      # assert cnn encoder shape
      assert cnn_encoder.embedding.weight.size() == (
          num_embeddings + 1,
          embedding_dim,
      )
      assert (
          cnn_encoder.conv1.__repr__()
          == "Conv1d(85, 32, kernel_size=(8,), stride=(1,))"
      )
      assert (
          cnn_encoder.conv2.__repr__()
          == "Conv1d(32, 64, kernel_size=(8,), stride=(1,))"
      )
      assert (
          cnn_encoder.conv3.__repr__()
          == "Conv1d(64, 96, kernel_size=(8,), stride=(1,))"
      )
      assert (
          cnn_encoder.global_max_pool.__repr__()
          == "AdaptiveMaxPool1d(output_size=1)"
      )
  
      input_batch = torch.randint(
          high=num_embeddings, size=(8, sequence_length)
      )
      output_encoding = cnn_encoder(input_batch)
      # assert output shape
      assert output_encoding.size() == (8, 96)
  
label_desc: Use image node_id 1 for calling a global function with example usage: test_cnn_encoder() without return types