code: def test_create_from_date_time_scalar(self):
      test_date = datetime.date(2018, 5, 4)
      date_tensor = dateslib.dates_from_datetimes(test_date)
      self.assertEqual(self.evaluate(date_tensor.year()), 2018)
      self.assertEqual(self.evaluate(date_tensor.month()), 5)
      self.assertEqual(self.evaluate(date_tensor.day()), 4)
  
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 8 for calling the DateTensorTest obj's underlying member method code with example usage: obj.test_create_from_date_time_scalar() without return types