code: def test_struct_errors(self):
      self.assertRaises(
          datashape.DataShapeSyntaxError,
          parse,
          "{id: int64, name: string amount: invalidtype}",
          self.sym,
      )
      self.assertRaises(
          datashape.DataShapeSyntaxError,
          parse,
          "{id: int64, name: string, amount: invalidtype}",
          self.sym,
      )
      self.assertRaises(
          datashape.DataShapeSyntaxError,
          parse,
          "{id: int64, name: string, amount: %}",
          self.sym,
      )
      self.assertRaises(
          datashape.DataShapeSyntaxError,
          parse,
          "{\n"
          + "   id: int64;\n"
          + "   name: string;\n"
          + "   amount+ float32;\n"
          + "}\n",
          self.sym,
      )
      self.assertRaises(
          datashape.DataShapeSyntaxError,
          parse,
          "{\n"
          + "   id: int64;\n"
          + "   'my field 1': string;\n"
          + "   amount+ float32;\n"
          + "}\n",
          self.sym,
      )
      # Don't accept explicitly Unicode string literals
      self.assertRaises(
          datashape.DataShapeSyntaxError,
          parse,
          "{\n"
          + "   id: int64,\n"
          + "   u'my field 1': string,\n"
          + "   amount: float32\n"
          + "}\n",
          self.sym,
      )
  
imports: from __future__ import absolute_import, division, print_function
  import unittest
  import pytest
  from datashader import datashape
  from datashader.datashape.util.testing import assert_dshape_equal
  from datashader.datashape.parser import parse
  from datashader.datashape import coretypes
  from datashader.datashape import DataShapeSyntaxError
label_desc: Use image node_id 6 for calling the TestDataShapeParseStruct obj's underlying member method code with example usage: obj.test_struct_errors() without return types