docstr: Build a Constituency Classifier model to be used by one of the later tests
docstr_tok: ["Build","a","Constituency","Classifier","model","to","be","used","by","one","of","the","later","tests"]
code: def build_model(
      self,
      tmp_path,
      constituency_model,
      fake_embeddings,
      train_file_with_trees,
      dev_file_with_trees,
      extra_args=None,
  ):
      """
      Build a Constituency Classifier model to be used by one of the later tests
      """
      save_dir = str(tmp_path / "classifier")
      save_name = "model.pt"
      args = [
          "--save_dir",
          save_dir,
          "--save_name",
          save_name,
          "--model_type",
          "constituency",
          "--constituency_model",
          constituency_model,
          "--wordvec_pretrain_file",
          str(fake_embeddings),
          "--fc_shapes",
          "20,10",
          "--train_file",
          str(train_file_with_trees),
          "--dev_file",
          str(dev_file_with_trees),
          "--max_epochs",
          "2",
          "--batch_size",
          "60",
      ]
      if extra_args is not None:
          args = args + extra_args
      args = classifier.parse_args(args)
      train_set = data.read_dataset(
          args.train_file, args.wordvec_type, args.min_train_len
      )
      trainer = Trainer.build_new_model(args, train_set)
      return trainer, train_set, args
  
imports: import os
  import pytest
  import stanza
  import stanza.models.classifier
  import stanza.models.classifiers.data
  from stanza.models.classifiers.trainer import Trainer
  from stanza.tests import TEST_MODELS_DIR
  from stanza.tests.classifiers.test_classifier import fake_embeddings
  from stanza.tests.classifiers.test_data import train_file_with_trees, dev_file_with_trees
  from stanza.models.common import utils
  from stanza.tests.constituency.test_trainer import build_trainer, TREEBANK
label_desc: Use image node_id 2 for calling the TestConstituencyClassifier obj's underlying member method code with example usage: obj.build_model(tmp_path, constituency_model, fake_embeddings, train_file_with_trees, dev_file_with_trees, extra_args) and returns: trainer,  train_set,  args