code: def _map_to_integer(values, uniques):
      """Map values based on its position in uniques."""
      table = _nandict({val: i for i, val in enumerate(uniques)})
      return np.array([table[v] for v in values])
  
imports: from collections import Counter
  from contextlib import suppress
  from typing import NamedTuple
  import numpy
  from .None import is_scalar_nan
label_desc: Use image node_id 4 for calling a global function with example usage: _map_to_integer(values, uniques) and returns: np