code: def __init__(self, tree_embedding, labels, args):
      super(ConstituencyClassifier, self).__init__()
      self.labels = labels
      # we build a separate config out of the args so that we can easily save it in torch
      self.config = SimpleNamespace(
          fc_shapes=args.fc_shapes,
          dropout=args.dropout,
          num_classes=len(labels),
          constituency_backprop=args.constituency_backprop,
          constituency_batch_norm=args.constituency_batch_norm,
          constituency_node_attn=args.constituency_node_attn,
          constituency_top_layer=args.constituency_top_layer,
          constituency_all_words=args.constituency_all_words,
          model_type=ModelType.CONSTITUENCY,
      )
  
      self.tree_embedding = tree_embedding
  
      self.fc_layers = build_output_layers(
          self.tree_embedding.output_size,
          self.config.fc_shapes,
          self.config.num_classes,
      )
      self.dropout = nn.Dropout(self.config.dropout)
  
file_path: stanza/stanza/models/classifiers/constituency_classifier.py
imports: import logging
  from types import SimpleNamespace
  import torch
  import torch.nn
  import torch.nn.functional
  from stanza.models.classifiers.base_classifier import BaseClassifier
  from stanza.models.classifiers.data import SentimentDatum
  from stanza.models.classifiers.utils import ModelType, build_output_layers
  from stanza.models.common.utils import split_into_batches, sort_with_indices, unsort
label_desc: Use image node_id 1 to create a new ConstituencyClassifier object from inherited base classes: BaseClassifier with example: obj = ConstituencyClassifier(tree_embedding, labels, args)