code: def sample_numerical(
      X_hat_num_split: List[np.ndarray],
      X_ohe_num_split: List[np.ndarray],
      C_num_split: Optional[List[np.ndarray]],
      stats: Dict[int, Dict[str, float]],
  ) -> List[np.ndarray]:
      """
      Samples numerical features according to the conditional vector. This method clips the values between the
      desired ranges specified in the conditional vector, and ensures that the values are between the minimum and
      the maximum values from train training datasets stored in the dictionary of statistics.
  
      Parameters
      ----------
      X_hat_num_split
          List of reconstructed numerical heads from the auto-encoder. This list should contain a single element
          as all the numerical features are part of a singe linear layer output.
      X_ohe_num_split
          List of original numerical heads. The list should contain a single element as part of the convention
          mentioned in the description of `X_ohe_hat_num`.
      C_num_split
          List of conditional vector for numerical heads. The list should contain a single element as part of the
          convention mentioned in the description of `X_ohe_hat_num`.
      stats
          Dictionary of statistic of the training data. Contains the minimum and maximum value of each numerical
          feature in the training set. Each key is an index of the column and each value is another dictionary
          containing ``'min'`` and ``'max'`` keys.
  
      Returns
      -------
      X_ohe_hat_num
          List of clamped input vectors according to the conditional vectors and the dictionary of statistics.
      """
      num_cols = X_hat_num_split[0].shape[
          1
      ]  # number of numerical columns
      sorted_cols = sorted(
          stats.keys()
      )  # ensure that the column ids are sorted
  
      for i, col_id in zip(range(num_cols), sorted_cols):
          # Extract the minimum and the maximum value for the current column from the training set.
          min, max = stats[col_id]["min"], stats[col_id]["max"]
  
          if C_num_split is not None:
              # Extract the minimum and the maximum value according to the conditional vector.
              lhs = X_ohe_num_split[0][:, i] + C_num_split[0][
                  :, 2 * i
              ] * (max - min)
              rhs = X_ohe_num_split[0][:, i] + C_num_split[0][
                  :, 2 * i + 1
              ] * (max - min)
  
              # Clamp output according to the conditional vector.
              X_hat_num_split[0][:, i] = np.clip(
                  X_hat_num_split[0][:, i], a_min=lhs, a_max=rhs
              )
  
          # Clamp output according to the minimum and maximum value from the training set.
          X_hat_num_split[0][:, i] = np.clip(
              X_hat_num_split[0][:, i], a_min=min, a_max=max
          )
  
      return X_hat_num_split
  
imports: from typing import TYPE_CHECKING, Callable, Dict, List, Optional, Tuple, Union
  import numpy
  import pandas
  from scipy.special import softmax
  from sklearn.compose import ColumnTransformer
  from sklearn.preprocessing import OneHotEncoder, StandardScaler
label_desc: Use image node_id 6 for calling a global function with example usage: sample_numerical(X_hat_num_split, X_ohe_num_split, C_num_split, stats) and returns: X_hat_num_split