code: def test_categorical_setitem_with_nan():
      gs = cudf.Series(
          [1, 2, np.nan, 10, np.nan, None], nan_as_null=False
      ).astype("category")
      gs[[1, 3]] = np.nan
  
      expected_series = cudf.Series(
          [1, np.nan, np.nan, np.nan, np.nan, None], nan_as_null=False
      ).astype(gs.dtype)
      assert_eq(gs, expected_series)
  
imports: import operator
  import string
  import warnings
  from contextlib import contextmanager
  from textwrap import dedent
  import numpy
  import pandas
  import pytest
  import cudf
  from cudf.core._compat import PANDAS_GE_134
  from cudf.testing._utils import NUMERIC_TYPES, assert_eq, assert_exceptions_equal, expect_warning_if
label_desc: Use image node_id 35 for calling a global function with example usage: test_categorical_setitem_with_nan() without return types