code: def test_date_subtraction(self):
      # Subtraction trivially transforms to addition, so we don't test
      # extensively.
      dates_from = dateslib.dates_from_tuples(
          [(2020, 3, 15), (2020, 3, 31)]
      )
      period = dateslib.PeriodTensor([2, 1], dateslib.PeriodType.MONTH)
      expected_ordinals = np.array(
          [
              datetime.date(2020, 1, 15).toordinal(),
              datetime.date(2020, 2, 29).toordinal(),
          ]
      )
      self.assertAllEqual(
          expected_ordinals, (dates_from - period).ordinal()
      )
  
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 22 for calling the DateTensorTest obj's underlying member method code with example usage: obj.test_date_subtraction() without return types