code: def __init__(
      self,
      config,
      model,
      length_prediction_model,
      trg_vocab,
      beam_size,
      use_gold_length,
      beam_ranking_algorithm,
      quantize,
      embed_quantize,
  ):
      super().__init__()
      length_prediction_model = (
          length_prediction_model.create_eval_module()
      )
      self.model = model
      self.length_prediction_model = length_prediction_model
      self.quantize_generator(
          quantize=quantize, embed_quantize=embed_quantize
      )
  
      self.generator_setup(
          trg_vocab=trg_vocab,
          beam_size=beam_size,
          use_gold_length=use_gold_length,
          beam_ranking_algorithm=beam_ranking_algorithm,
          config=config,
      )
  
imports: from enum import Enum
  from typing import Dict, Optional, Tuple
  import torch
  from pytext.common.constants import TORCH_VERSION
  from pytext.config import ConfigBase
  from pytext.models.module import Module
  from pytext.torchscript.vocab import ScriptVocabulary
  from torch import Tensor
label_desc: Use image node_id 2 to create a new MaskedSequenceGenerator object from inherited base classes: Module with example: obj = MaskedSequenceGenerator(config, model, length_prediction_model, trg_vocab, beam_size, use_gold_length, beam_ranking_algorithm, quantize, embed_quantize)