code: def test_validation(self):
      not_raised = []
      for y, m, d in test_data.invalid_dates:
          try:
              self.evaluate(
                  dateslib.dates_from_tuples([(y, m, d)]).month()
              )
              not_raised.append((y, m, d))
          except tf.errors.InvalidArgumentError:
              pass
      self.assertEmpty(not_raised)
  
      for invalid_ordinal in [-5, 0]:
          with self.assertRaises(tf.errors.InvalidArgumentError):
              self.evaluate(
                  dateslib.dates_from_ordinals(
                      [invalid_ordinal]
                  ).month()
              )
  
imports: import datetime
  import numpy
  import tensorflow.compat.v2
  import tf_quant_finance
  from tf_quant_finance.datetime import test_data
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 14 for calling the DateTensorTest obj's underlying member method code with example usage: obj.test_validation() without return types