code: def test_cap_reset(self, dtype):
      notional = 100.0
      maturity_date = dates.convert_to_date_tensor(
          [(2022, 1, 15), (2022, 1, 15)]
      )
      start_date = dates.convert_to_date_tensor(
          [(2021, 1, 15), (2021, 1, 15)]
      )
      valuation_date = dates.convert_to_date_tensor([(2021, 2, 1)])
  
      period3m = dates.periods.months(3)
      cap = instruments.CapAndFloor(
          start_date,
          maturity_date,
          period3m,
          [0.005, 0.01],
          daycount_convention=instruments.DayCountConvention.ACTUAL_365,
          notional=notional,
          dtype=dtype,
      )
      curve_valuation_date = dates.convert_to_date_tensor(
          [(2021, 1, 1)]
      )
      curve_dates = curve_valuation_date + dates.periods.months(
          [0, 3, 12, 24]
      )
      reference_curve = instruments.RateCurve(
          curve_dates,
          np.array([0.005, 0.01, 0.015, 0.02], dtype=np.float64),
          valuation_date=curve_valuation_date,
          dtype=np.float64,
      )
      market = instruments.InterestRateMarket(
          reference_curve=reference_curve,
          discount_curve=reference_curve,
          libor_rate=[0.006556, 0.006556],
      )
  
      price = self.evaluate(
          cap.price(
              valuation_date,
              market,
              model=instruments.InterestRateModelType.LOGNORMAL_RATE,
              pricing_context=0.5,
          )
      )
      np_testing.assert_allclose(
          price, [0.9389714183634128, 0.5354250398709062], atol=1e-6
      )
  
file_path: tf-quant-finance/tf_quant_finance/experimental/instruments/cap_floor_test.py
imports: from absl.testing import parameterized
  import numpy
  from numpy import testing
  import tensorflow.compat.v2
  import tf_quant_finance
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 6 for calling the CapFloorTest obj's underlying member method code with example usage: obj.test_cap_reset(dtype) without return types