code: def get_indexer_raise_missing(
      idx: pd.Index, vals: List[str]
  ) -> List[int]:
      idxs = idx.get_indexer(vals)
      missing = [v for i, v in zip(idxs, vals) if i == -1]
      if missing:
          raise ValueError(
              f"The following values are missing from the index: {missing}"
          )
      return idxs
  
imports: import random
  from itertools import chain
  import numpy
  import pandas
  from typing import List
label_desc: Use image node_id 4 for calling a global function with example usage: get_indexer_raise_missing(idx, vals) and returns: idxs