code: def validate(ds):
      """
      Validate a datashape to see whether it is well-formed.
  
      Parameters
      ----------
      ds : DataShape
  
      Examples
      --------
      >>> from datashader.datashape import dshape
      >>> dshape('10 * int32')
      dshape("10 * int32")
      >>> dshape('... * int32')
      dshape("... * int32")
      >>> dshape('... * ... * int32') # doctest: +IGNORE_EXCEPTION_DETAIL
      Traceback (most recent call last):
          ...
      TypeError: Can only use a single wildcard
      >>> dshape('T * ... * X * ... * X') # doctest: +IGNORE_EXCEPTION_DETAIL
      Traceback (most recent call last):
          ...
      TypeError: Can only use a single wildcard
      >>> dshape('T * ...') # doctest: +IGNORE_EXCEPTION_DETAIL
      Traceback (most recent call last):
          ...
      DataShapeSyntaxError: Expected a dtype
      """
      traverse(_validate, ds)
  
label_desc: Use image node_id 2 for calling a global function with example usage: validate(ds) without return types