code: def preprocess(
      x: np.ndarray,
      y: np.ndarray,
      nb_classes: int = 10,
      clip_values: Optional["CLIP_VALUES_TYPE"] = None,
  ) -> Tuple[np.ndarray, np.ndarray]:
      """
      Scales `x` to [0, 1] and converts `y` to class categorical confidences.
  
      :param x: Data instances.
      :param y: Labels.
      :param nb_classes: Number of classes in dataset.
      :param clip_values: Original data range allowed value for features, either one respective scalar or one value per
             feature.
      :return: Rescaled values of `x`, `y`.
      """
      if clip_values is None:
          min_, max_ = np.amin(x), np.amax(x)
      else:
          min_, max_ = clip_values
  
      normalized_x = (x - min_) / (max_ - min_)
      categorical_y = to_categorical(y, nb_classes)
  
      return normalized_x, categorical_y
  
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 39 for calling a global function with example usage: preprocess(x, y, nb_classes, clip_values) and returns: normalized_x,  categorical_y