class_docstr: Holds the grouping information for a single key
  
  Parameters
  ----------
  index : Index
  grouper :
  obj : DataFrame or Series
  name : Label
  level :
  observed : bool, default False
      If we are a Categorical, use the observed values
  in_axis : if the Grouping is a column in self.obj and hence among
      Groupby.exclusions list
  dropna : bool, default True
      Whether to drop NA groups.
  uniques : Array-like, optional
      When specified, will be used for unique values. Enables including empty groups
      in the result for a BinGrouper. Must not contain duplicates.
  
  Attributes
  -------
  indices : dict
      Mapping of {group -> index_list}
  codes : ndarray
      Group codes
  group_index : Index or None
      unique groups
  groups : dict
      Mapping of {group -> label_list}
class_docstr_tok: ["Holds","the","grouping","information","for","a","single","key","Parameters","--","--","--","--","--","index",":","Index","grouper",":","obj",":","DataFrame","or","Series","name",":","Label","level",":","observed",":","bool",",","default","False","If","we","are","a","Categorical",",","use","the","observed","values","in_axis",":","if","the","Grouping","is","a","column","in","self.obj","and","hence","among","Groupby.exclusions","list","dropna",":","bool",",","default","True","Whether","to","drop","NA","groups",".","uniques",":","Array-like",",","optional","When","specified",",","will","be","used","for","unique","values",".","Enables","including","empty","groups","in","the","result","for","a","BinGrouper",".","Must","not","contain","duplicates",".","Attributes","--","--","--","-","indices",":","dict","Mapping","of","{","group","-",">","index_list","}","codes",":","ndarray","Group","codes","group_index",":","Index","or","None","unique","groups","groups",":","dict","Mapping","of","{","group","-",">","label_list","}"]
docstr: Analogous to result_index, but holding an ArrayLike to ensure
  we can retain ExtensionDtypes.
docstr_tok: ["Analogous","to","result_index",",","but","holding","an","ArrayLike","to","ensure","we","can","retain","ExtensionDtypes","."]
code: def group_arraylike(self) -> ArrayLike:
      """
      Analogous to result_index, but holding an ArrayLike to ensure
      we can retain ExtensionDtypes.
      """
      if self._all_grouper is not None:
          # retain dtype for categories, including unobserved ones
          return self.result_index._values
  
      elif self._passed_categorical:
          return self.group_index._values
  
      return self._codes_and_uniques[1]
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Hashable, Iterator, final
  import warnings
  import numpy
  from pandas._config import using_copy_on_write
  from pandas._typing import ArrayLike, Axis, NDFrameT, npt
  from pandas.errors import InvalidIndexError
  from pandas.util._decorators import cache_readonly
  from pandas.util._exceptions import find_stack_level
  from pandas.core.dtypes.common import is_categorical_dtype, is_list_like, is_scalar
  from pandas.core import algorithms
  from pandas.core.arrays import Categorical, ExtensionArray
  import pandas.core.common
  from pandas.core.frame import DataFrame
  from pandas.core.groupby import ops
  from pandas.core.groupby.categorical import recode_for_groupby
  from pandas.core.indexes.api import CategoricalIndex, Index, MultiIndex
  from pandas.core.series import Series
  from pandas.io.formats.printing import pprint_thing
label_desc: Use image node_id 10 for calling the Grouping obj's underlying member method code with example usage: obj.group_arraylike() and returns: self, self, self