code: def validate(schema, value):  # noqa: F811
      head = schema[0]
      return (len(schema) == 1 and validate(head, value)) or (
          isdimension(head)
          and (isinstance(head, Var) or int(head) == len(value))
          and all(
              validate(DataShape(*schema[1:]), item) for item in value
          )
      )
  
imports: from __future__ import print_function, division, absolute_import
  from .dispatch import dispatch
  from .coretypes import CType, Date, DateTime, DataShape, Record, String, Time, Var, from_numpy, to_numpy_dtype
  from .predicates import isdimension
  from .util import dshape
  from datetime import date, time, datetime
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: validate(schema, value) and returns: unknown