code: def mse(
      y_true: Union[np.array, list],
      y_predicted: Union[np.array, list],
      *args,
      **kwargs,
  ) -> float:
      """
      Calculates mean squared error.
      Args:
          y_true: list of true values
          y_predicted: list of predicted values
      Returns:
          float: Mean squared error
      """
      for value in [y_true, y_predicted]:
          assert np.isfinite(value).all()
      return mean_squared_error(y_true, y_predicted, *args, **kwargs)
  
imports: import numpy
  from sklearn.metrics import mean_squared_error
  from typing import Union
  from deeppavlov.core.common.metrics_registry import register_metric
label_desc: Use image node_id 1 for calling a global function with example usage: mse(y_true, y_predicted) and returns: mean_squared_error