code: def _check_datetime_field(name, measure):
      
      if not isinstance(measure[name], (Date, DateTime)):
          raise TypeError(
              "'{name}' field must be a '{dt}', not: '{dshape}'".format(
                  name=name,
                  dt=DateTime(),
                  dshape=measure[name],
              ),
          )
docs: Check that a field is a datetime inside some measure.
  
      Parameters
      ----------
      name : str
          The name of the field to check.
      measure : Record
          The record to check the field of.
  
      Raises
      ------
      TypeError
          If the field is not a datetime inside ``measure``.