code: def convert_by_vocab(
      vocab,
      items,
      max_seq_length=None,
      blank_id=0,
      unk_id=1,
      uncased=True,
  ):
      """Converts a sequence of [tokens|ids] using the vocab."""
      output = []
      for item in items:
          if uncased:
              item = item.lower()
          if item in vocab:
              output.append(vocab[item])
          else:
              output.append(unk_id)
      if max_seq_length != None:
          if len(output) > max_seq_length:
              output = output[:max_seq_length]
          else:
              while len(output) < max_seq_length:
                  output.append(blank_id)
      return output
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import unicodedata
  import six
label_desc: Use image node_id 13 for calling a global function with example usage: convert_by_vocab(vocab, items, max_seq_length, blank_id, unk_id, uncased) and returns: output