docstr: Test invalid annotation strings for which the Annotation class should raise
  ValueError.
docstr_tok: ["Test","invalid","annotation","strings","for","which","the","Annotation","class","should","raise","ValueError","."]
code: def test_annotation_errors(self):
      """
      Test invalid annotation strings for which the Annotation class should raise
      ValueError.
      """
  
      TEST_EXAMPLES = (
          # Extra brackets
          "[device/close_app please [] exit ]",
          # Missing closing bracket
          "[IN:CREATE_CALL call [SL:CONTACT mom ]",
          # Missing intent label
          "[IN:CREATE_REMINDER Remind me to [ [IN:CREATE_CALL [SL:METHOD_CALL call ] "
          "[SL:CONTACT John ] ] ] [SL:DATE_TIME at 6 pm tonight ] ]",
          # No brackets
          "hang on, it's marty's party, not mary's party",
      )
      for annotation_str in TEST_EXAMPLES:
          try:
              Annotation(annotation_str, accept_flat_intents_slots=True)
          except ValueError as e:
              print(e)
              pass
          else:
              raise Exception("Annotation error not catched.")
  
imports: from unittest import TestCase
  from pytext.data.data_structures.annotation import Annotation
label_desc: Use image node_id 2 for calling the TestAnnotation obj's underlying member method code with example usage: obj.test_annotation_errors() without return types