code: def translate(M, x, y=None, z=None):
      y = x if y is None else y
      z = x if z is None else z
      T = np.array(
          [
              [1.0, 0.0, 0.0, x],
              [0.0, 1.0, 0.0, y],
              [0.0, 0.0, 1.0, z],
              [0.0, 0.0, 0.0, 1.0],
          ],
          dtype=M.dtype,
      ).T
      M[...] = np.dot(M, T)
      return M
  
file_path: vispy/examples/gloo/gl/cube.py
imports: import math
  import numpy
  from vispy import app
  from vispy.gloo import gl
label_desc: Use image node_id 3 for calling a global function with example usage: translate(M, x, y, z) and returns: M