class_docstr: Represents a tensor of time periods.
class_docstr_tok: ["Represents","a","tensor","of","time","periods","."]
code: def shape(self):
      return self._quantity.shape
  
imports: import tensorflow.compat.v2
  from tf_quant_finance.datetime import constants
  from tf_quant_finance.datetime import tensor_wrapper
label_desc: Use image node_id 7 for calling the PeriodTensor obj's underlying member method code with example usage: obj.shape() and returns: self