code: def test_validate():
      assert validate(int, 1)
      assert validate("int", 1)
      assert validate(str, "Alice")
      assert validate(dshape("string"), "Alice")
      assert validate(dshape("int"), 1)
      assert validate(dshape("int")[0], 1)
      assert validate("real", 2.0)
      assert validate("2 * int", (1, 2))
      assert not validate("3 * int", (1, 2))
      assert not validate("2 * int", 2)
  
file_path: datashader/datashader/datashape/tests/test_user.py
imports: import pytest
  from datashader.datashape.user import issubschema, validate
  from datashader.datashape import dshape
  from datetime import date, time, datetime
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: test_validate() without return types