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]))

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 ] ) )
check that a field is a datetime inside some measure .