code: def floats_to_one_hot(labels: np.ndarray):
      """
      Convert a 2D-array of floating point labels to binary class matrix.
  
      :param labels: A 2D-array of floating point labels of shape `(nb_samples, nb_classes)`
      :return: A binary matrix representation of `labels` in the shape `(nb_samples, nb_classes)`
      :rtype: `np.ndarray`
      """
      labels = np.array(labels)
      for feature in labels.T:  # pylint: disable=E1133
          unique = np.unique(feature)
          unique.sort()
          for index, value in enumerate(unique):
              feature[feature == value] = index
      return labels.astype(np.float32)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import math
  import os
  import shutil
  import sys
  import tarfile
  import warnings
  import zipfile
  from functools import wraps
  from inspect import signature
  from typing import TYPE_CHECKING, Callable, List, Dict, Optional, Tuple, Union
  import numpy
  import six
  from scipy.special import gammainc
  from tqdm.auto import tqdm
  from art import config
label_desc: Use image node_id 12 for calling a global function with example usage: floats_to_one_hot(labels) and returns: labels