class_docstr: Tests for methods in piecewise module.
class_docstr_tok: ["Tests","for","methods","in","piecewise","module","."]
docstr: Tests that tensor_or_func converts inputs into Tensors.
docstr_tok: ["Tests","that","tensor_or_func","converts","inputs","into","Tensors","."]
code: def test_convert_to_tensor_or_func_tensors(self):
      """Tests that tensor_or_func converts inputs into Tensors."""
      dtype = tf.float64
      inputs = [2.0, [1, 2, 3], np.arange(1, 5, 1)]
      output = []
      expected = []
      for i in inputs:
          x = piecewise.convert_to_tensor_or_func(i, dtype)
          # Check that the returned value is a tensor and is_const flag is set.
          output.append((tf.is_tensor(x[0]), x[1]))
          expected.append((True, True))
  
      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 15 for calling the Piecewise obj's underlying member method code with example usage: obj.test_convert_to_tensor_or_func_tensors() without return types