code: def mse(y_label, y_predict):
      """
      Calculate the mean squared error (MSE).
  
      .. math::
  
          \\text{MSE} = \\frac{1}{n}\\sum_{t=1}^n (y_t-\\hat{y_t})^2
  
      :param y_label: Array-like of shape = (n_samples, \*).
             Ground truth (correct) target values.
      :param y_predict: Array-like of shape = (n_samples, \*).
             Estimated target values.
      :return: Ndarray of floats.
               An array of non-negative floating point values (the best value is 0.0).
      """
      result = np.mean((y_label - y_predict) ** 2)
      return result
  
file_path: BigDL/python/chronos/src/bigdl/chronos/metric/forecast_metrics.py
imports: from numpy import ndarray
  import numpy
  from bigdl.nano.utils.common import invalidInputError
  from timeit import repeat
  import random
label_desc: Use image node_id 2 for calling a global function with example usage: mse(y_label, y_predict) and returns: result