docstr: Asserts given DateTensor has expected components.
docstr_tok: ["Asserts","given","DateTensor","has","expected","components","."]
code: def assert_date_tensor_components(
      self,
      date_tensor,
      expected_years_np,
      expected_months_np,
      expected_days_np,
      expected_ordinals_np=None,
  ):
      """Asserts given DateTensor has expected components."""
      self.assertAllEqual(expected_years_np, date_tensor.year())
      self.assertAllEqual(expected_months_np, date_tensor.month())
      self.assertAllEqual(expected_days_np, date_tensor.day())
      if expected_ordinals_np is not None:
          self.assertAllEqual(
              expected_ordinals_np, date_tensor.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 31 for calling the DateTensorTest obj's underlying member method code with example usage: obj.assert_date_tensor_components(date_tensor, expected_years_np, expected_months_np, expected_days_np, expected_ordinals_np) without return types