code: def parse_row_iloc_indexer(key: Any, n: int) -> IndexingSpec:
      """
      Normalize and produce structured information about a row indexer.
  
      Given a row indexer that has already been destructured by
      :func:`destructure_iloc_key`, inspect further and produce structured
      information for indexing operations to act upon.
  
      Parameters
      ----------
      key
          Suitably destructured key for row indexing
      n
          Length of frame to index
  
      Returns
      -------
      IndexingSpec
          Structured data for indexing. A tag + parsed data.
  
      Raises
      ------
      IndexError
          If a valid type of indexer is provided, but it is out of
          bounds
      TypeError
          If the indexing key is otherwise invalid.
      """
      if key is Ellipsis:
          return SliceIndexer(slice(None))
      elif isinstance(key, slice):
          return SliceIndexer(key)
      elif _is_scalar_or_zero_d_array(key):
          return ScalarIndexer(GatherMap(key, n, nullify=False))
      else:
          key = cudf.core.column.as_column(key)
          if isinstance(key, cudf.core.column.CategoricalColumn):
              key = key.as_numerical_column(key.codes.dtype)
          if is_bool_dtype(key.dtype):
              return MaskIndexer(BooleanMask(key, n))
          elif len(key) == 0:
              return EmptyIndexer()
          elif is_integer_dtype(key.dtype):
              return MapIndexer(GatherMap(key, n, nullify=False))
          else:
              raise TypeError(
                  "Cannot index by location "
                  f"with non-integer key of type {type(key)}"
              )
  
file_path: cudf/python/cudf/cudf/core/indexing_utils.py
imports: from __future__ import annotations
  from dataclasses import dataclass
  from typing import Any, List, Tuple, Union
  from typing_extensions import TypeAlias
  import cudf
  from cudf.api.types import _is_scalar_or_zero_d_array, is_bool_dtype, is_integer, is_integer_dtype
  from cudf.core.copy_types import BooleanMask, GatherMap
label_desc: Use image node_id 4 for calling a global function with example usage: parse_row_iloc_indexer(key, n) and returns: SliceIndexer, SliceIndexer, ScalarIndexer, MaskIndexer, EmptyIndexer, MapIndexer