code: def prepare_target_labels(self, y):
      pos_label, neg_label = "1", "0"
  
      if self._categorical_y is not None:
          if len(y.shape) == 1:
              # binary classification
              for label, value in self._categorical_y.to_json().items():
                  if value == 1:
                      pos_label = label
                  else:
                      neg_label = label
              # threshold is applied in AutoML class
              return pd.DataFrame(
                  {
                      "prediction_{}".format(neg_label): 1 - y,
                      "prediction_{}".format(pos_label): y,
                  }
              )
          else:
              # multiclass classification
              if "unique_values" not in self._categorical_y.to_json():
                  labels = dict(
                      (v, k)
                      for k, v in self._categorical_y.to_json().items()
                  )
              else:
                  labels = {
                      i: v
                      for i, v in enumerate(
                          self._categorical_y.to_json()["unique_values"]
                      )
                  }
  
              d = {}
              cols = []
              for i in range(y.shape[1]):
                  d["prediction_{}".format(labels[i])] = y[:, i]
                  cols += ["prediction_{}".format(labels[i])]
              df = pd.DataFrame(d)
              df["label"] = np.argmax(np.array(df[cols]), axis=1)
  
              df["label"] = df["label"].map(labels)
  
              return df
      else:  # self._categorical_y is None
          if "ml_task" in self._params:
              if self._params["ml_task"] == BINARY_CLASSIFICATION:
                  return pd.DataFrame(
                      {"prediction_0": 1 - y, "prediction_1": y}
                  )
              elif self._params["ml_task"] == MULTICLASS_CLASSIFICATION:
                  return pd.DataFrame(
                      data=y,
                      columns=[
                          "prediction_{}".format(i)
                          for i in range(y.shape[1])
                      ],
                  )
  
      return pd.DataFrame({"prediction": y})
  
imports: import copy
  import logging
  import warnings
  import numpy
  import pandas
  from supervised.algorithms.registry import BINARY_CLASSIFICATION, MULTICLASS_CLASSIFICATION, REGRESSION
  from supervised.exceptions import AutoMLException
  from supervised.preprocessing.datetime_transformer import DateTimeTransformer
  from supervised.preprocessing.exclude_missing_target import ExcludeRowsMissingTarget
  from supervised.preprocessing.goldenfeatures_transformer import GoldenFeaturesTransformer
  from supervised.preprocessing.kmeans_transformer import KMeansTransformer
  from supervised.preprocessing.label_binarizer import LabelBinarizer
  from supervised.preprocessing.label_encoder import LabelEncoder
  from supervised.preprocessing.preprocessing_categorical import PreprocessingCategorical
  from supervised.preprocessing.preprocessing_missing import PreprocessingMissingValues
  from supervised.preprocessing.preprocessing_utils import PreprocessingUtils
  from supervised.preprocessing.scale import Scale
  from supervised.preprocessing.text_transformer import TextTransformer
  from supervised.utils.config import LOG_LEVEL
label_desc: Use image node_id 8 for calling the Preprocessing obj's underlying member method code with example usage: obj.prepare_target_labels(y) and returns: pd, pd, df, pd, pd