docstr: Tests abs realized volatiltity with non-default times.
docstr_tok: ["Tests","abs","realized","volatiltity","with","non-default","times","."]
code: def test_abs_volatility_non_default_times(self):
      """Tests abs realized volatiltity with non-default times."""
      dtype = tf.float64
      num_series = 200
      num_times = 100
      seed = (1, 2)
      draws = tf.random.stateless_normal(
          (num_series, num_times), seed=seed, dtype=dtype
      )
      time_deltas = tf.random.stateless_uniform(
          (num_series, num_times), seed=seed, dtype=dtype
      )
      sample_paths = tf.math.exp(tf.math.cumsum(draws, axis=-1))
      volatilities = tff.models.realized_volatility(
          sample_paths,
          times=tf.math.cumsum(time_deltas, axis=1),
          returns_type=tff.models.ReturnsType.ABS,
      )
      numer = tf.math.abs(tff.math.diff(sample_paths, exclusive=True))
      denom = sample_paths[:, :-1] * time_deltas[:, 1:]
      expected_volatilities = tf.math.reduce_sum(numer / denom, axis=1)
      self.assertAllClose(volatilities, expected_volatilities, 1e-6)
  
file_path: tf-quant-finance/tf_quant_finance/models/realized_volatility_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 8 for calling the RealizedVolatilityTest obj's underlying member method code with example usage: obj.test_abs_volatility_non_default_times() without return types