code: def calculate_neg_mse_per_sample(
      labels, predictions, index=None
  ) -> pd.Series:
      """Calculate negative mean squared error per sample."""
      if index is None and isinstance(labels, pd.Series):
          index = labels.index
      return pd.Series(
          [
              -((y - y_pred) ** 2)
              for y, y_pred in zip(labels, predictions)
          ],
          index=index,
      )
  
imports: from typing import List, Optional
  import numpy
  import pandas
  from deepchecks.core.errors import DeepchecksValueError
label_desc: Use image node_id 1 for calling a global function with example usage: calculate_neg_mse_per_sample(labels, predictions, index) and returns: pd