code: def months(n):
      return PeriodTensor(n, constants.PeriodType.MONTH)
  
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 6 for calling a global function with example usage: months(n) and returns: PeriodTensor