code: def apply_category_mapping(
      X: np.ndarray, category_map: Dict[int, List[str]]
  ) -> np.ndarray:
      """
      Applies a category mapping for the categorical feature in the array. It transforms ints back to strings
      to be readable.
  
      Parameters
      -----------
      X
          Array containing the columns to be mapped.
      category_map
          Dictionary of category mapping. Keys are columns index, and values are list of feature values.
  
      Returns
      -------
      Transformed array.
      """
      pd_X = pd.DataFrame(X)
  
      for key in category_map:
          pd_X[key].replace(
              range(len(category_map[key])),
              category_map[key],
              inplace=True,
          )
  
      return pd_X.to_numpy()
  
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 14 for calling a global function with example usage: apply_category_mapping(X, category_map) and returns: pd_X