code: def add_noise_cov(
      K: tf.Tensor, likelihood_variance: TensorType
  ) -> tf.Tensor:
      """
      Returns K + σ², where σ² is the diagonal likelihood noise variance.
      """
      k_diag = tf.linalg.diag_part(K)
      return tf.linalg.set_diag(K, k_diag + likelihood_variance)
  
file_path: GPflow/gpflow/utilities/model_utils.py
imports: from typing import Any, Callable
  import tensorflow
  from check_shapes import check_shapes
  from ..base import TensorType
  from ..likelihoods import Gaussian
label_desc: Use image node_id 2 for calling a global function with example usage: add_noise_cov(K, likelihood_variance) and returns: tf