class_docstr: Tests for the variance_swaps module.
class_docstr_tok: ["Tests","for","the","variance_swaps","module","."]
code: def test_variance_swap_fair_strike_raises_validation_error(self):
      dtype = tf.float64
      # Mismatching shapes for strikes and vols.
      strikes = tf.ones((3, 2), dtype=dtype)
      vols = tf.ones((3, 4), dtype=dtype)
      reference_strike = 1.0
      discount_rate = 0.0
      expiry = 1.0
      with self.assertRaises(tf.errors.InvalidArgumentError):
          _ = self.evaluate(
              tff.black_scholes.variance_swap_fair_strike(
                  strikes,
                  vols,
                  strikes,
                  vols,
                  expiry,
                  discount_rate,
                  reference_strike,
                  reference_strike,
                  validate_args=True,
                  dtype=dtype,
              )
          )
  
file_path: tf-quant-finance/tf_quant_finance/black_scholes/variance_swaps_test.py
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  import tf_quant_finance
  from tf_quant_finance.black_scholes import variance_swaps
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 6 for calling the VarianceSwapsTest obj's underlying member method code with example usage: obj.test_variance_swap_fair_strike_raises_validation_error() without return types