code: def test_outer_multiply(self):
      # Scalar - scalar
      scalars = tf.constant(2.0), tf.constant(3.0)
      vectors = tf.constant([1.0, 2.0]), tf.constant([3.0, 5.0, 1.0])
      matrices = (
          tf.constant([[1.0, 2], [2.0, 3]]),
          tf.constant([[1.0, 2, 3], [4, 5, 6]]),
      )
      result1 = self.evaluate(
          bm_utils.outer_multiply(scalars[0], scalars[1])
      )
      self.assertEqual(result1, 6)
      # Scalar - vector
      result2 = self.evaluate(
          bm_utils.outer_multiply(scalars[0], vectors[1])
      )
      np.testing.assert_allclose(result2, [6.0, 10.0, 2.0])
      # Vector - scalar
      result3 = self.evaluate(
          bm_utils.outer_multiply(vectors[0], scalars[1])
      )
      np.testing.assert_allclose(result3, [3.0, 6.0])
  
      # Vector - vector
      result4 = self.evaluate(
          bm_utils.outer_multiply(vectors[0], vectors[1])
      )
      np.testing.assert_allclose(
          result4, [[3.0, 5.0, 1.0], [6.0, 10.0, 2.0]]
      )
  
      # Vector - vector non commutative
      result5 = self.evaluate(
          bm_utils.outer_multiply(vectors[1], vectors[0])
      )
      np.testing.assert_allclose(
          result5, [[3.0, 6.0], [5.0, 10.0], [1.0, 2.0]]
      )
  
      # Vector - matrix
      result6 = self.evaluate(
          bm_utils.outer_multiply(vectors[0], matrices[0])
      )
      np.testing.assert_allclose(
          result6, [[[1.0, 2], [2, 3]], [[2, 4], [4, 6]]]
      )
  
      # Matrix - matrix
      result7 = self.evaluate(
          bm_utils.outer_multiply(matrices[1], matrices[0])
      )
      np.testing.assert_allclose(
          result7,
          [
              [
                  [[1.0, 2], [2.0, 3]],
                  [[2.0, 4], [4.0, 6]],
                  [[3.0, 6], [6.0, 9]],
              ],
              [
                  [[4.0, 8], [8.0, 12]],
                  [[5.0, 10], [10.0, 15]],
                  [[6.0, 12], [12.0, 18]],
              ],
          ],
      )
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow.python.framework import test_util
  from tf_quant_finance.models.legacy import brownian_motion_utils
label_desc: Use image node_id 2 for calling the BrownianMotionUtilsTest obj's underlying member method code with example usage: obj.test_outer_multiply() without return types