code: def apply_translation(self, offset):
          
          # work on 2D and 3D paths
          dimension = self.vertices.shape[1]
          # make sure offset is correct length and type
          offset = np.array(
              offset, dtype=np.float64).reshape(dimension)
          # create a homogenous transform
          matrix = np.eye(dimension + 1)
          # apply the offset
          matrix[:dimension, dimension] = offset
  
          self.apply_transform(matrix)
docs: Apply a transformation matrix to the current path in- place
  
          Parameters
          -----------
          offset : float or (3,) float
            Translation to be applied to mesh