code: def get_cms_coupon_spec(self, fix_rate, fix_leg_freq="6m"):
      p3m = dates.periods.months(3)
      p6m = dates.periods.months(6)
      p1y = dates.periods.year()
      fix_spec = instruments.FixedCouponSpecs(
          coupon_frequency=p6m if fix_leg_freq == "6m" else p3m,
          currency="usd",
          notional=1.0,
          coupon_rate=fix_rate,
          daycount_convention=instruments.DayCountConvention.ACTUAL_365,
          businessday_rule=dates.BusinessDayConvention.NONE,
      )
      flt_spec = instruments.FloatCouponSpecs(
          coupon_frequency=p3m,
          reference_rate_term=p3m,
          reset_frequency=p3m,
          currency="usd",
          notional=1.0,
          businessday_rule=dates.BusinessDayConvention.NONE,
          coupon_basis=0.0,
          coupon_multiplier=1.0,
          daycount_convention=instruments.DayCountConvention.ACTUAL_365,
      )
      cms_spec = instruments.CMSCouponSpecs(
          coupon_frequency=p3m,
          tenor=p1y,
          float_leg=flt_spec,
          fixed_leg=fix_spec,
          notional=1.0,
          coupon_basis=0.0,
          coupon_multiplier=1.0,
          businessday_rule=None,
          daycount_convention=instruments.DayCountConvention.ACTUAL_365,
      )
      return cms_spec
  
file_path: tf-quant-finance/tf_quant_finance/experimental/instruments/cms_swap_test.py
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  import tf_quant_finance
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 1 for calling the CMSSwapTest obj's underlying member method code with example usage: obj.get_cms_coupon_spec(fix_rate, fix_leg_freq) and returns: cms_spec