code: def __init__(
      self,
      wordlm,
      subwordlm,
      word_dict,
      subword_dict,
      subwordlm_weight=0.8,
      oov_penalty=1.0,
      open_vocab=True,
  ):
      super(MultiLevelLM, self).__init__()
      self.wordlm = wordlm
      self.subwordlm = subwordlm
      self.word_eos = word_dict["<eos>"]
      self.word_unk = word_dict["<unk>"]
      self.var_word_eos = torch.LongTensor([self.word_eos])
      self.var_word_unk = torch.LongTensor([self.word_unk])
      self.space = subword_dict["<space>"]
      self.eos = subword_dict["<eos>"]
      self.lexroot = make_lexical_tree(
          word_dict, subword_dict, self.word_unk
      )
      self.log_oov_penalty = math.log(oov_penalty)
      self.open_vocab = open_vocab
      self.subword_dict_size = len(subword_dict)
      self.subwordlm_weight = subwordlm_weight
      self.normalized = True
  
file_path: espnet/espnet/lm/pytorch_backend/extlm.py
imports: import math
  import torch
  import torch.nn
  import torch.nn.functional
  from espnet.lm.lm_utils import make_lexical_tree
  from espnet.nets.pytorch_backend.nets_utils import to_device
label_desc: Use image node_id 1 to create a new MultiLevelLM object from inherited base classes: nn with example: obj = MultiLevelLM(wordlm, subwordlm, word_dict, subword_dict, subwordlm_weight, oov_penalty, open_vocab)