code: def regression_loss(observed_ratings, predicted_ratings):
      """
      Regression loss.
  
      Parameters
      ----------
  
      observed_ratings: tensor
          Tensor containing observed ratings.
      predicted_ratings: tensor
          Tensor containing rating predictions.
  
      Returns
      -------
  
      loss, float
          The mean value of the loss function.
      """
  
      assert_no_grad(observed_ratings)
  
      return ((observed_ratings - predicted_ratings) ** 2).mean()
  
file_path: spotlight/spotlight/losses.py
imports: import torch
  import torch.nn.functional
  from spotlight.torch_utils import assert_no_grad
label_desc: Use image node_id 5 for calling a global function with example usage: regression_loss(observed_ratings, predicted_ratings) and returns: unknown