code: def init_emb(self, emb_matrix):
      if isinstance(emb_matrix, np.ndarray):
          emb_matrix = torch.from_numpy(emb_matrix)
      vocab_size = len(self.vocab["word"])
      dim = self.args["word_emb_dim"]
      assert emb_matrix.size() == (
          vocab_size,
          dim,
      ), "Input embedding matrix must match size: {} x {}, found {}".format(
          vocab_size, dim, emb_matrix.size()
      )
      self.word_emb.weight.data.copy_(emb_matrix)
  
imports: import os
  import logging
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from torch.nn.utils.rnn import pad_packed_sequence, pack_padded_sequence, pack_sequence, pad_sequence, PackedSequence
  from stanza.models.common.data import map_to_ids, get_long_tensor
  from stanza.models.common.exceptions import ForwardCharlmNotFoundError, BackwardCharlmNotFoundError
  from stanza.models.common.packed_lstm import PackedLSTM
  from stanza.models.common.dropout import WordDropout, LockedDropout
  from stanza.models.common.char_model import CharacterModel, CharacterLanguageModel
  from stanza.models.common.crf import CRFLoss
  from stanza.models.common.foundation_cache import load_bert
  from stanza.models.common.vocab import PAD_ID, UNK_ID, EMPTY_ID
  from stanza.models.common.bert_embedding import extract_bert_embeddings
label_desc: Use image node_id 2 for calling the NERTagger obj's underlying member method code with example usage: obj.init_emb(emb_matrix) without return types