code: def test_CompositionFunction(self):
      lstm_dim = 100
      embedding = torch.ones(1, lstm_dim)
      input_sequence = [embedding for _ in range(10)]
  
      compositionalNN = CompositionalNN(lstm_dim)
      self.assertEqual(
          compositionalNN(input_sequence).shape, embedding.shape
      )
  
      compositionalSummationNN = CompositionalSummationNN(lstm_dim)
      self.assertEqual(
          compositionalSummationNN(input_sequence).shape,
          embedding.shape,
      )
  
imports: import unittest
  from collections import Counter
  import torch
  import torch.nn
  from pytext.common.constants import Stage
  from pytext.config.module_config import PoolingType
  from pytext.legacy.vocab import Vocab
  from pytext.models.embeddings import DictEmbedding, EmbeddingList, WordEmbedding
  from pytext.models.semantic_parsers.rnng.rnng_data_structures import CompositionalNN, CompositionalSummationNN, Element, ParserState, StackLSTM
  from pytext.models.semantic_parsers.rnng.rnng_parser import RNNGParser
label_desc: Use image node_id 2 for calling the RNNGDataStructuresTest obj's underlying member method code with example usage: obj.test_CompositionFunction() without return types