docstr: Return True if array is a categorical
  
  Parameters
  ----------
  arr : list-like
      List
  
  Returns
  -------
  bool
      Whether array `arr` is a categorical
code: def categorical(arr):
      """
      Return True if array is a categorical
  
      Parameters
      ----------
      arr : list-like
          List
  
      Returns
      -------
      bool
          Whether array `arr` is a categorical
      """
      if not hasattr(arr, "dtype"):
          return False
  
      return isinstance(arr.dtype, pd.CategoricalDtype)
  
imports: from __future__ import annotations
  import inspect
  import itertools
  import warnings
  from collections import defaultdict
  from collections.abc import Iterable, Sequence
  from contextlib import suppress
  from typing import TYPE_CHECKING, cast, overload
  from warnings import warn
  import numpy
  import pandas
  from pandas.core.groupby import DataFrameGroupBy
  from ..exceptions import PlotnineError, PlotnineWarning
  from ..mapping import aes
label_desc: Use image node_id 6 for calling the array_kind obj's underlying member method code with example usage: obj.categorical(arr) and returns: isinstance, False