code: def capture_text(state):
      next_pos = state.find("[")
      sub = state[:] if next_pos < 0 else state[:next_pos]
      if sub:
          state.add_text(sub)
      if next_pos >= 0:
          state.move(next_pos)
          capture_slot(state)
  
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 1 for calling a global function with example usage: capture_text(state) without return types