class_docstr: Represents a tensor of dates.
class_docstr_tok: ["Represents","a","tensor","of","dates","."]
docstr: Returns a new DateTensor with each date shifted to the end of month.
code: def to_end_of_month(self):
      """Returns a new DateTensor with each date shifted to the end of month."""
      days = _num_days_in_month(self._months, self._years)
      return from_year_month_day(
          self._years, self._months, days, validate=False
      )
  
imports: import collections.abc
  import datetime
  import numpy
  import tensorflow.compat.v2
  from tf_quant_finance.datetime import constants
  from tf_quant_finance.datetime import date_utils
  from tf_quant_finance.datetime import periods
  from tf_quant_finance.datetime import tensor_wrapper
label_desc: Use image node_id 12 for calling the DateTensor obj's underlying member method code with example usage: obj.to_end_of_month() and returns: from_year_month_day