class_docstr: Represents a tensor of time periods.
class_docstr_tok: ["Represents","a","tensor","of","time","periods","."]
code: def _apply_op(self, op_fn):
      q = op_fn(self._quantity)
      return PeriodTensor(q, self._period_type)
  
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 10 for calling the PeriodTensor obj's underlying member method code with example usage: obj._apply_op(op_fn) and returns: PeriodTensor