code: def testLinspace(self, start, end, num):
      expected = np.linspace(start, end, num, dtype=np.float32)
      result = self._testTernary(
          math_ops.linspace,
          np.float32(start),
          np.float32(end),
          np.int32(num),
          expected,
      )
      # According to linspace spec, start has to be the first element and end has
      # to be last element.
      self.assertEqual(result[-1], expected[-1])
      self.assertEqual(result[0], expected[0])
  
imports: from absl.testing import parameterized
  import numpy
  import scipy.special
  from tensorflow.compiler.tests import xla_test
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_math_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 2 for calling the TernaryOpsTest obj's underlying member method code with example usage: obj.testLinspace(start, end, num) without return types