code: def test_funcproto(sym):
      # Simple funcproto
      assert parse("(float32) -> float64", sym) == ct.DataShape(
          ct.Function(
              ct.DataShape(ct.float32), ct.DataShape(ct.float64)
          )
      )
      assert parse("(int16, int32) -> bool", sym) == ct.DataShape(
          ct.Function(
              ct.DataShape(ct.int16),
              ct.DataShape(ct.int32),
              ct.DataShape(ct.bool_),
          )
      )
      # A trailing comma is ok
      assert parse("(float32,) -> float64", sym) == ct.DataShape(
          ct.Function(
              ct.DataShape(ct.float32), ct.DataShape(ct.float64)
          )
      )
      assert_dshape_equal(
          parse("(int16, int32,) -> bool", sym),
          ct.DataShape(
              ct.Function(
                  ct.DataShape(ct.int16),
                  ct.DataShape(ct.int32),
                  ct.DataShape(ct.bool_),
              )
          ),
      )
  
      # Empty argument signature.
      assert_dshape_equal(
          parse("() -> bool", sym),
          ct.DataShape(
              ct.Function(
                  ct.DataShape(ct.bool_),
              )
          ),
      )
  
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 2 for calling a global function with example usage: test_funcproto(sym) without return types