code: def test_categorical_as_unordered(pd_str_cat, inplace):
      pd_sr = pd.Series(pd_str_cat.copy().set_ordered(True))
      cd_sr = cudf.Series(pd_str_cat.copy().set_ordered(True))
  
      assert cd_sr.cat.ordered is True
      assert cd_sr.cat.ordered == pd_sr.cat.ordered
  
      # pandas internally uses a deprecated call to set_ordered(inplace=inplace)
      # inside as_unordered.
      with pytest.warns(FutureWarning):
          pd_sr_1 = pd_sr.cat.as_unordered(inplace=inplace)
      with expect_warning_if(inplace, FutureWarning):
          cd_sr_1 = cd_sr.cat.as_unordered(inplace=inplace)
      if inplace:
          pd_sr_1 = pd_sr
          cd_sr_1 = cd_sr
  
      assert cd_sr_1.cat.ordered is False
      assert cd_sr_1.cat.ordered == pd_sr_1.cat.ordered
      assert str(cd_sr_1) == str(pd_sr_1)
  
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 20 for calling a global function with example usage: test_categorical_as_unordered(pd_str_cat, inplace) without return types