code: def test_min_max_not_ordered_raises(self, aggregation):
      # unordered cats have no min/max
      cat = Categorical(["a", "b", "c", "d"], ordered=False)
      msg = f"Categorical is not ordered for operation {aggregation}"
      agg_func = getattr(cat, aggregation)
  
      with pytest.raises(TypeError, match=msg):
          agg_func()
  
      ufunc = np.minimum if aggregation == "min" else np.maximum
      with pytest.raises(TypeError, match=msg):
          ufunc.reduce(cat)
  
imports: import re
  import sys
  import numpy
  import pytest
  from pandas.compat import PYPY
  from pandas import Categorical, CategoricalDtype, DataFrame, Index, NaT, Series, date_range
  import pandas._testing
  from pandas.api.types import is_scalar
label_desc: Use image node_id 1 for calling the TestCategoricalAnalytics obj's underlying member method code with example usage: obj.test_min_max_not_ordered_raises(aggregation) without return types