code: def test_recode_to_categories_large(self):
      N = 1000
      codes = np.arange(N)
      old = Index(codes)
      expected = np.arange(N - 1, -1, -1, dtype=np.int16)
      new = Index(expected)
      result = recode_for_categories(codes, old, new)
      tm.assert_numpy_array_equal(result, expected)
  
imports: import re
  import numpy
  import pytest
  from pandas.compat import PY311
  from pandas import Categorical, CategoricalIndex, DataFrame, Index, Series, StringDtype
  import pandas._testing
  from pandas.core.arrays.categorical import recode_for_categories
label_desc: Use image node_id 3 for calling the TestPrivateCategoricalAPI obj's underlying member method code with example usage: obj.test_recode_to_categories_large() without return types