code: def num_to_ord(data: np.ndarray, dist: dict) -> np.ndarray:
      """
      Transform numerical values into categories using the map calculated under the fit method.
  
      Parameters
      ----------
      data
          `Numpy` array with the numerical data.
      dist
          Dict with as keys the categorical variables and as values
          the numerical value for each category.
  
      Returns
      -------
      `Numpy` array with transformed numerical data into categories.
      """
      X = data.copy()
      for k, v in dist.items():
          num_col = np.repeat(
              X[:, k].reshape(-1, 1), v.shape[0], axis=1
          )
          diff = np.abs(num_col - v.reshape(1, -1))
          X[:, k] = np.argmin(diff, axis=1)
      return X
  
imports: from typing import Dict, List, Tuple
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: num_to_ord(data, dist) and returns: X