code: def _map_categories(space, points, minimum):
      """
      Map categorical values to integers in a set of points.
  
      Returns
      -------
      mapped_points : np.array, shape=points.shape
          A copy of `points` with categoricals replaced with their indices in
          the corresponding `Dimension`.
  
      mapped_minimum : np.array, shape (space.n_dims,)
          A copy of `minimum` with categoricals replaced with their indices in
          the corresponding `Dimension`.
  
      iscat : np.array, shape (space.n_dims,)
         Boolean array indicating whether dimension `i` in the `space` is
         categorical.
      """
      points = np.asarray(
          points, dtype=object
      )  # Allow slicing, preserve cats
      iscat = np.repeat(False, space.n_dims)
      min_ = np.zeros(space.n_dims)
      pts_ = np.zeros(points.shape)
      for i, dim in enumerate(space.dimensions):
          if isinstance(dim, Categorical):
              iscat[i] = True
              catmap = dict(zip(dim.categories, count()))
              pts_[:, i] = [catmap[cat] for cat in points[:, i]]
              min_[i] = catmap[minimum[i]]
          else:
              pts_[:, i] = points[:, i]
              min_[i] = minimum[i]
      return pts_, min_, iscat
  
imports: import sys
  import numpy
  from itertools import count
  from functools import partial
  from scipy.optimize import OptimizeResult
  from .acquisition import _gaussian_acquisition
  from guild._skopt import expected_minimum, expected_minimum_random_sampling
  from .space import Categorical
  from collections import Counter
  import matplotlib.pyplot
  from matplotlib.pyplot import cm
  from matplotlib.ticker import LogLocator
  from matplotlib.ticker import MaxNLocator, FuncFormatter
label_desc: Use image node_id 13 for calling a global function with example usage: _map_categories(space, points, minimum) and returns: pts_,  min_,  iscat