code: def _set_y_as_series(y):
      """Set first column of a DataFrame as pandas.Series"""
      return pd.Series(y.iloc[:, 0])
  
imports: from typing import Any, Dict, Optional, Union
  import numpy
  import pandas
  from sklearn import metrics
  from sklearn.metrics._scorer import _BaseScorer
  from sktime.performance_metrics.forecasting._functions import mean_absolute_percentage_error, mean_absolute_scaled_error, mean_squared_scaled_error
  import pycaret.internal.metrics
  from pycaret.containers.metrics.base_metric import MetricContainer
label_desc: Use image node_id 7 for calling a global function with example usage: _set_y_as_series(y) and returns: pd