class_docstr: LM Interface for ESPnet model implementation.
docstr: Initialize this class with python-level args.
  
  Args:
      idim (int): The number of vocabulary.
  
  Returns:
      LMinterface: A new instance of LMInterface.
docstr_tok: ["Initialize","this","class","with","python-level","args",".","Args",":","idim","(","int",")",":","The","number","of","vocabulary",".","Returns",":","LMinterface",":","A","new","instance","of","LMInterface","."]
code: def build(cls, n_vocab: int, **kwargs):
      """Initialize this class with python-level args.
  
      Args:
          idim (int): The number of vocabulary.
  
      Returns:
          LMinterface: A new instance of LMInterface.
  
      """
      # local import to avoid cyclic import in lm_train
      from espnet.bin.lm_train import get_parser
  
      def wrap(parser):
          return get_parser(parser, required=False)
  
      args = argparse.Namespace(**kwargs)
      args = fill_missing_args(args, wrap)
      args = fill_missing_args(args, cls.add_arguments)
      return cls(n_vocab, args)
  
file_path: espnet/espnet/nets/lm_interface.py
imports: import argparse
  from espnet.nets.scorer_interface import ScorerInterface
  from espnet.utils.dynamic_import import dynamic_import
  from espnet.utils.fill_missing_args import fill_missing_args
label_desc: Use image node_id 2 for calling the LMInterface obj's underlying member method code with example usage: obj.build(cls, n_vocab) and returns: cls, get_parser