class_docstr: A representation of a column as a gather map.
  
  This object augments the column with the information that it
  is valid as a gather map for the specified number of rows with
  the given nullification flag.
  
  Parameters
  ----------
  column
      The data to turn into a column and then verify
  nrows
      The number of rows to verify against
  nullify
      Will the gather map be used nullifying out of bounds
      accesses?
  
  Returns
  -------
  GatherMap
      New object wrapping the column bearing witness to its
      suitability as a gather map for columns with nrows.
  
  Raises
  ------
  TypeError
      If the column is of unsuitable dtype
  IndexError
      If the map is not in bounds.
code: def __init__(self, column: Any, nrows: int, *, nullify: bool):
      self.column = cudf.core.column.as_column(column)
      self.nrows = nrows
      self.nullify = nullify
      if len(self.column) == 0:
          # Any empty column is valid as a gather map
          # This is necessary because as_column([]) defaults to float64
          # TODO: we should fix this further up.
          # Alternately we can have an Optional[Column] and handle None
          # specially in _gather.
          self.column = cast(
              "NumericalColumn", self.column.astype(size_type_dtype)
          )
      else:
          if self.column.dtype.kind not in {"i", "u"}:
              raise TypeError("Gather map must have integer dtype")
          if not nullify:
              lo, hi = libcudf.reduce.minmax(self.column)
              if lo.value < -nrows or hi.value >= nrows:
                  raise IndexError(
                      f"Gather map is out of bounds for [0, {nrows})"
                  )
  
file_path: cudf/python/cudf/cudf/core/copy_types.py
imports: from dataclasses import dataclass
  from typing import TYPE_CHECKING, Any, cast
  from typing_extensions import Self
  import cudf
  import cudf._lib
  from cudf._lib.types import size_type_dtype
label_desc: Use image node_id 1 to create a new GatherMap object  with example: obj = GatherMap(column, nrows)