def _create_from_codes(self, codes, dtype=None, name=None):
if dtype is None:<EOL><INDENT>dtype = self.dtype<EOL><DEDENT>if name is None:<EOL><INDENT>name = self.name<EOL><DEDENT>cat = Categorical.from_codes(codes, dtype=dtype)<EOL>return CategoricalIndex(cat, name=name)<EOL>
*this is an internal non-public method*

create the correct categorical from codes

Parameters
----------
codes : new codes
dtype: CategoricalDtype, defaults to existing
name : optional name attribute, defaults to existing

Returns
-------
CategoricalIndex