code: def prev_next_pos_iob(tokens, index, history):
      word, pos = tokens[index]
  
      if index == 0:
          prevword, prevpos, previob = ("<START>",) * 3
      else:
          prevword, prevpos = tokens[index - 1]
          previob = history[index - 1]
  
      if index == len(tokens) - 1:
          nextword, nextpos = ("<END>",) * 2
      else:
          nextword, nextpos = tokens[index + 1]
  
      feats = {
          "word": word,
          "pos": pos,
          "nextword": nextword,
          "nextpos": nextpos,
          "prevword": prevword,
          "prevpos": prevpos,
          "previob": previob,
      }
  
      return feats
  
file_path: nltk-trainer/nltk_trainer/chunking/chunkers.py
imports: import nltk.tag
  from nltk.chunk import ChunkParserI
  from nltk.chunk.util import conlltags2tree, tree2conlltags
  from nltk.tag import UnigramTagger, BigramTagger, ClassifierBasedTagger
  from .transforms import node_label
label_desc: Use image node_id 4 for calling a global function with example usage: prev_next_pos_iob(tokens, index, history) and returns: feats