code: def test_categorical_index_with_nan_repr():
      cat_index = cudf.Index(
          cudf.Series(
              [1, 2, np.nan, 10, np.nan, None], nan_as_null=False
          ).astype("category")
      )
  
      expected_repr = (
          "CategoricalIndex([1.0, 2.0, NaN, 10.0, NaN, <NA>], "
          "categories=[1.0, 2.0, 10.0, NaN], ordered=False, dtype='category')"
      )
  
      assert repr(cat_index) == expected_repr
  
      sliced_expected_repr = (
          "CategoricalIndex([NaN, 10.0, NaN, <NA>], "
          "categories=[1.0, 2.0, 10.0, NaN], ordered=False, dtype='category')"
      )
  
      assert repr(cat_index[2:]) == sliced_expected_repr
  
imports: import textwrap
  import cupy
  import numpy
  import pandas
  import pytest
  from hypothesis import given, settings, strategies
  import cudf
  from cudf.testing import _utils
  from cudf.utils.dtypes import np_dtypes_to_pandas_dtypes
label_desc: Use image node_id 28 for calling a global function with example usage: test_categorical_index_with_nan_repr() without return types