code: def _add_diagonal_shift(matrix, shift):
      return tf.linalg.set_diag(
          matrix,
          tf.linalg.diag_part(matrix) + shift,
          name="add_diagonal_shift",
      )
  
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import nest_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.math.psd_kernels import positive_semidefinite_kernel
  from tensorflow_probability.python.math.psd_kernels.internal import util
label_desc: Use image node_id 2 for calling a global function with example usage: _add_diagonal_shift(matrix, shift) and returns: tf