def _delegate_method(self, name, *args, **kwargs):
method = getattr(self._values, name)<EOL>if '<STR_LIT>' in kwargs:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>res = method(*args, **kwargs)<EOL>if is_scalar(res):<EOL><INDENT>return res<EOL><DEDENT>return CategoricalIndex(res, name=self.name)<EOL>
method delegation to the ._values