@classmethod<EOL><INDENT>def _add_logical_methods(cls):<DEDENT>
_doc = """<STR_LIT>"""<EOL>_index_shared_docs['<STR_LIT>'] = dedent("""<STR_LIT>""")<EOL>_index_shared_docs['<STR_LIT>'] = dedent("""<STR_LIT>""")<EOL>def _make_logical_function(name, desc, f):<EOL><INDENT>@Substitution(outname=name, desc=desc)<EOL>@Appender(_index_shared_docs['<STR_LIT>' + name])<EOL>@Appender(_doc)<EOL>def logical_func(self, *args, **kwargs):<EOL><INDENT>result = f(self.values)<EOL>if (isinstance(result, (np.ndarray, ABCSeries, Index)) and<EOL>result.ndim == <NUM_LIT:0>):<EOL><INDENT>return result.dtype.type(result.item())<EOL><DEDENT>else:  <EOL><INDENT>return result<EOL><DEDENT><DEDENT>logical_func.__name__ = name<EOL>return logical_func<EOL><DEDENT>cls.all = _make_logical_function('<STR_LIT:all>', '<STR_LIT>'<EOL>'<STR_LIT>',<EOL>np.all)<EOL>cls.any = _make_logical_function('<STR_LIT>',<EOL>'<STR_LIT>',<EOL>np.any)<EOL>
Add in logical methods.