code: def tags_to_preslots(tokens, tags, tagging_scheme):
      if tagging_scheme == TaggingScheme.IO:
          slots = _tags_to_preslots(
              tags, tokens, start_of_io_slot, end_of_io_slot
          )
      elif tagging_scheme == TaggingScheme.BIO:
          slots = _tags_to_preslots(
              tags, tokens, start_of_bio_slot, end_of_bio_slot
          )
      elif tagging_scheme == TaggingScheme.BILOU:
          slots = _tags_to_preslots(
              tags, tokens, start_of_bilou_slot, end_of_bilou_slot
          )
      else:
          raise ValueError("Unknown tagging scheme %s" % tagging_scheme)
      return slots
  
imports: from __future__ import unicode_literals
  from builtins import range
  from enum import Enum, unique
  from snips_nlu.constants import END, SLOT_NAME, START, TEXT
  from snips_nlu.preprocessing import Token, tokenize
  from snips_nlu.result import unresolved_slot
label_desc: Use image node_id 9 for calling a global function with example usage: tags_to_preslots(tokens, tags, tagging_scheme) and returns: slots