class_docstr: OpenNMT option parser powered with option check methods.
code: def update_model_opts(cls, model_opt):
      if model_opt.word_vec_size > 0:
          model_opt.src_word_vec_size = model_opt.word_vec_size
          model_opt.tgt_word_vec_size = model_opt.word_vec_size
  
      # Backward compatibility with "fix_word_vecs_*" opts
      if hasattr(model_opt, "fix_word_vecs_enc"):
          model_opt.freeze_word_vecs_enc = model_opt.fix_word_vecs_enc
      if hasattr(model_opt, "fix_word_vecs_dec"):
          model_opt.freeze_word_vecs_dec = model_opt.fix_word_vecs_dec
  
      if model_opt.layers > 0:
          model_opt.enc_layers = model_opt.layers
          model_opt.dec_layers = model_opt.layers
  
      if model_opt.hidden_size > 0:
          model_opt.enc_hid_size = model_opt.hidden_size
          model_opt.dec_hid_size = model_opt.hidden_size
  
      model_opt.brnn = model_opt.encoder_type == "brnn"
  
      if model_opt.copy_attn_type is None:
          model_opt.copy_attn_type = model_opt.global_attention
  
      if model_opt.alignment_layer is None:
          model_opt.alignment_layer = -2
          model_opt.lambda_align = 0.0
          model_opt.full_context_alignment = False
  
imports: import configargparse
  import os
  import torch
  import onmt.opts
  from onmt.utils.logging import logger
  from onmt.constants import CorpusName, ModelTask
  from onmt.transforms import AVAILABLE_TRANSFORMS
label_desc: Use image node_id 3 for calling the ArgumentParser obj's underlying member method code with example usage: obj.update_model_opts(cls, model_opt) without return types