class_docstr: Accessor object for categorical properties of the Series values.
  
  Examples
  --------
  >>> s.cat.categories  # doctest: +SKIP
  
  Notes
  -----
  Attributes that depend only on metadata are eager
  
  * categories
  * ordered
  
  Attributes depending on the entire dataset are lazy
  
  * codes
  * ...
  
  So `df.a.cat.categories` <=> `df.a._meta.cat.categories`
  So `df.a.cat.codes` <=> `df.a.map_partitions(lambda x: x.cat.codes)`
docstr: Ensure the categories in this series are known.
  
  If the categories are known, this is a no-op. If unknown, the
  categories are computed, and a new series with known categories is
  returned.
  
  Parameters
  ----------
  kwargs
      Keywords to pass on to the call to `compute`.
docstr_tok: ["Ensure","the","categories","in","this","series","are","known",".","If","the","categories","are","known",",","this","is","a","no-op",".","If","unknown",",","the","categories","are","computed",",","and","a","new","series","with","known","categories","is","returned",".","Parameters","--","--","--","--","--","kwargs","Keywords","to","pass","on","to","the","call","to","`","compute","`","."]
code: def as_known(self, **kwargs):
      """Ensure the categories in this series are known.
  
      If the categories are known, this is a no-op. If unknown, the
      categories are computed, and a new series with known categories is
      returned.
  
      Parameters
      ----------
      kwargs
          Keywords to pass on to the call to `compute`.
      """
      if self.known:
          return self._series
      categories = (
          self._property_map("categories").unique().compute(**kwargs)
      )
      return self.set_categories(categories.values)
  
imports: from __future__ import annotations
  from collections import defaultdict
  from numbers import Integral
  import pandas
  from pandas.api.types import is_scalar
  from tlz import partition_all
  from dask.base import compute_as_if_collection, tokenize
  from dask.dataframe import methods
  from dask.dataframe.accessor import Accessor
  from dask.dataframe.dispatch import categorical_dtype, categorical_dtype_dispatch, is_categorical_dtype
  from dask.dataframe.utils import AttributeNotImplementedError, clear_known_categories, has_known_categories
  from dask.highlevelgraph import HighLevelGraph
label_desc: Use image node_id 2 for calling the CategoricalAccessor obj's underlying member method code with example usage: obj.as_known() and returns: self, self