code: def translate(offset, dtype=None):
      """Translate by an offset (x, y, z) .
  
      Parameters
      ----------
      offset : array-like, shape (3,)
          Translation in x, y, z.
      dtype : dtype | None
          Output type (if None, don't cast).
  
      Returns
      -------
      M : ndarray
          Transformation matrix describing the translation.
      """
      assert len(offset) == 3
      x, y, z = offset
      M = np.array(
          [
              [1.0, 0.0, 0.0, 0.0],
              [0.0, 1.0, 0.0, 0.0],
              [0.0, 0.0, 1.0, 0.0],
              [x, y, z, 1.0],
          ],
          dtype,
      )
      return M
  
file_path: vispy/vispy/util/transforms.py
imports: from __future__ import division
  import math
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: translate(offset, dtype) and returns: M