code: def test_scalar_mul(self):
      computed_list = list()
      # left-hand-side is tensor
      computed_list.append(
          tf_i128.from_i128(
              tf_i128.mul(self.A, self._dim1_scalar), self.scale
          )
      )
      computed_list.append(
          tf_i128.from_i128(
              tf_i128.mul(self.A, self._dim2_scalar), self.scale
          )
      )
      # left-hand-side is scalar
      computed_list.append(
          tf_i128.from_i128(
              tf_i128.mul(self._dim1_scalar, self.B), self.scale
          )
      )
      computed_list.append(
          tf_i128.from_i128(
              tf_i128.mul(self._dim2_scalar, self.B), self.scale
          )
      )
      # element-wise product
      computed_list.append(
          tf_i128.from_i128(
              tf_i128.right_shift(
                  tf_i128.mul(self.A, self.B), self.precision_bits
              ),
              self.scale,
          )
      )
      computed_list.append(
          tf_i128.from_i128(
              tf_i128.right_shift(
                  tf_i128.mul(self.A, self.E), self.precision_bits
              ),
              self.scale,
          )
      )
      # scalar * scalar
      computed_list.append(
          tf_i128.from_i128(
              tf_i128.mul(self._dim1_scalar, self._dim1_scalar), 1
          )
      )
      computed_list.append(
          tf_i128.from_i128(
              tf_i128.mul(self._dim2_scalar, self._dim2_scalar), 1
          )
      )
      computed_list.append(
          tf_i128.from_i128(
              tf_i128.mul(self._dim1_scalar, self._dim2_scalar), 1
          )
      )
      computed_list.append(
          tf_i128.from_i128(
              tf_i128.mul(self._dim2_scalar, self._dim1_scalar), 1
          )
      )
  
      ground_list = list()
      ground_list.append(self._A * 10)
      ground_list.append(self._A * 11)
      ground_list.append(self._B * 10)
      ground_list.append(self._B * 11)
      ground_list.append(self._A * self._B)
      ground_list.append(self._A * self._E)
      ground_list.append(np.array(10 * 10))
      ground_list.append(np.array([11 * 11]))
      ground_list.append(np.array([10 * 11]))
      ground_list.append(np.array([10 * 11]))
  
      for c, g in zip(computed_list, ground_list):
          np.testing.assert_allclose(c, g, rtol=0.0, atol=0.01)
          self.assertTrue(c.shape == g.shape, "wrong scalar_mul shape")
  
imports: import unittest
  import numpy
  import tensorflow
  from tf_encrypted.operations import tf_i128
label_desc: Use image node_id 4 for calling the I128TestCase obj's underlying member method code with example usage: obj.test_scalar_mul() without return types