code: def transform_proba(
      self, y: Union[DataFrame, np.ndarray], as_pandas=False
  ) -> Union[DataFrame, np.ndarray]:
      if self.invalid_class_count > 0:
          # this assumes y has only 0's for any columns it is about to remove, if it does not, weird things may start to happen since rows will not sum to 1
          if isinstance(y, DataFrame):
              cols_to_drop = [
                  self.cat_mappings_dependent_var_uncleaned[col]
                  for col in self.label_index_to_remove
              ]
              y = y.drop(columns=cols_to_drop)
          else:
              y = np.delete(y, self.label_index_to_remove, axis=1)
      if as_pandas:
          if isinstance(y, DataFrame):
              return y.rename(columns=self.inv_map)
          else:
              return DataFrame(
                  data=y,
                  columns=self.ordered_class_labels_transformed,
                  dtype=np.float32,
              )
      elif isinstance(y, DataFrame):
          return y.to_numpy()
      else:
          return y
  
imports: import copy
  import logging
  from typing import Union
  import numpy
  from pandas import DataFrame, Series
  from autogluon.core.constants import BINARY, MULTICLASS, QUANTILE, REGRESSION, SOFTCLASS
  from autogluon.core.utils import get_pred_from_proba, get_pred_from_proba_df
label_desc: Use image node_id 4 for calling the LabelCleanerMulticlass obj's underlying member method code with example usage: obj.transform_proba(y, as_pandas) and returns: y, DataFrame, y, y