code: def build_lm_graph(self, sent):
      dy.renew_cg()
      init_state = self.builder.initial_state()
  
      errs = []  # will hold expressions
      es = []
      state = init_state
      for cw, nw in zip(sent, sent[1:]):
          # assume word is already a word-id
          x_t = dy.lookup(self.lookup, int(cw))
          state = state.add_input(x_t)
          y_t = state.output()
          r_t = self.bias + (self.R * y_t)
          err = dy.pickneglogsoftmax(r_t, int(nw))
          errs.append(err)
      nerr = dy.esum(errs)
      return nerr
  
file_path: dynet/examples/rnnlm/rnnlm.py
imports: import dynet
  import time
  import random
  from collections import defaultdict
  from itertools import count
  import argparse
  import sys
  import util
label_desc: Use image node_id 4 for calling the RNNLanguageModel obj's underlying member method code with example usage: obj.build_lm_graph(sent) and returns: nerr