class_docstr: State Machine for parsing
class_docstr_tok: ["State","Machine","for","parsing"]
code: def __getitem__(self, key):
      current = self.current
      if isinstance(key, int):
          return self.input[current + key]
      elif isinstance(key, slice):
          start = current + key.start if key.start else current
          return self.input[slice(start, key.stop, key.step)]
      else:
          raise TypeError("Bad key type: %s" % type(key))
  
imports: from __future__ import absolute_import, print_function, unicode_literals
  from abc import ABCMeta, abstractmethod
  from builtins import object
  from io import IOBase
  from future.utils import with_metaclass
  from snips_nlu.constants import DATA, ENTITY, SLOT_NAME, TEXT, UTTERANCES
  from snips_nlu.exceptions import IntentFormatError
label_desc: Use image node_id 10 for calling the SM obj's underlying member method code with example usage: obj.__getitem__(key) and returns: self, self