code: def format_distillation_labels(
      y, problem_type, num_classes=None, eps_labelsmooth=0.01
  ):
      """Transforms train/test label objects (y) to the correct type for distillation (smoothed regression targets for binary, one-hot labels for multiclass).
      eps_labelsmooth : truncates labels to [EPS, 1-EPS], eg. when converting binary problems -> regression
      """
      if problem_type == MULTICLASS:
          y_int = y.to_numpy()
          y = np.zeros((y_int.size, num_classes))
          y[np.arange(y_int.size), y_int] = 1
          y = pd.DataFrame(y)
      elif problem_type == BINARY:
          min_pred = 0.0
          max_pred = 1.0
          y = eps_labelsmooth + (
              (1 - 2 * eps_labelsmooth) / (max_pred - min_pred)
          ) * (y - min_pred)
      return y
  
file_path: autogluon/core/src/autogluon/core/augmentation/distill_utils.py
imports: import gc
  import logging
  import numpy
  import pandas
  from sklearn.neighbors import NearestNeighbors
  from autogluon.common.features.feature_metadata import FeatureMetadata
  from autogluon.common.features.types import R_CATEGORY, R_FLOAT, R_INT
  from ..constants import BINARY, MULTICLASS, REGRESSION
  from ..metrics import mean_squared_error
label_desc: Use image node_id 1 for calling a global function with example usage: format_distillation_labels(y, problem_type, num_classes, eps_labelsmooth) and returns: y