code: def add_offset(mat: np.ndarray, offset: int = 1) -> np.ndarray:
      """
      Add +1 to all values in matrix mat
  
      Arguments:
          mat (numpy.ndarray): A 2D matrix with int values
          offset (int): offset to add
  
      Returns:
          numpy.ndarray: input matrix
      """
      for i, vec in enumerate(mat):
          offset_arr = np.array(vec.shape)
          offset_arr.fill(offset)
          mat[i] = vec + offset_arr
      return mat
  
file_path: nlp-architect/nlp_architect/utils/generic.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import re
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: add_offset(mat, offset) and returns: mat