class_docstr: Tests for methods in piecewise module.
class_docstr_tok: ["Tests","for","methods","in","piecewise","module","."]
docstr: Tests that tensor_or_func recognizes inputs of PiecewiseConstantFunc.
docstr_tok: ["Tests","that","tensor_or_func","recognizes","inputs","of","PiecewiseConstantFunc","."]
code: def test_convert_to_tensor_or_func_PiecewiseConstantFunc(self):
      """Tests that tensor_or_func recognizes inputs of PiecewiseConstantFunc."""
      dtype = tf.float64
      times = np.arange(0, 10, 1)
      values = np.ones(11)
      pwc = piecewise.PiecewiseConstantFunc(times, values, dtype=dtype)
      output = piecewise.convert_to_tensor_or_func(pwc)
      expected = (pwc, False)
      self.assertAllEqual(output, expected)
  
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 16 for calling the Piecewise obj's underlying member method code with example usage: obj.test_convert_to_tensor_or_func_PiecewiseConstantFunc() without return types