code: def gs_numpy(mat):
      res = np.array(mat)
      n_vecs = res.shape[-1]
      for i in range(n_vecs):
          u = res[:, i]
          u /= np.linalg.norm(u)
          for j in range(i + 1, n_vecs):
              v = res[:, j]
              res[:, j] -= np.dot(u, v) * u
      return res / np.sqrt(np.sum(np.square(res), -2, keepdims=True))
  
file_path: probability/tensorflow_probability/python/math/gram_schmidt_test.py
imports: import numpy
  import scipy.linalg
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math.gram_schmidt import gram_schmidt
label_desc: Use image node_id 1 for calling a global function with example usage: gs_numpy(mat) and returns: unknown