code: def predict(self, sentences, batch_size=20, threshold=None):
      result = []
  
      for batch in NerModel.slice(sentences, batch_size):
          sentence_lengths = NerModel.get_sentence_lengths(batch)
  
          feed_dict = {
              self.sentence_lengths: sentence_lengths,
              self.word_embeddings: NerModel.get_word_embeddings(batch),
              self.word_lengths: NerModel.get_word_lengths(batch),
              self.char_ids: NerModel.get_char_ids(batch),
              self.dropout: 1.1,
          }
  
          prediction = self.session.run(
              self.prediction, feed_dict=feed_dict
          )
          batch_prediction = np.reshape(prediction, (len(batch), -1))
  
          for i in range(len(batch)):
              sentence = []
              for word in range(sentence_lengths[i]):
                  tag = batch_prediction[i][word]
                  sentence.append(tag)
  
              result.append(sentence)
  
      return result
  
imports: import math
  import random
  import sys
  import numpy
  import tensorflow
  from .sentence_grouper import SentenceGrouper
  from ..tf2contrib import *
label_desc: Use image node_id 24 for calling the NerModel obj's underlying member method code with example usage: obj.predict(sentences, batch_size, threshold) and returns: result