def get_methods(self, include_default=False):
        for method in self.handler.allowed_methods:
            met = getattr(self.handler, CsrfExemptResource.callmap.get(method))
            stale = inspect.getmodule(met) is handler

            if not self.handler.is_anonymous:
                if met and (not stale or include_default):
                    yield HandlerMethod(met, stale)
            else:
                if not stale or met.__name__ == "read" \
                        and 'GET' in self.allowed_methods:
                    yield HandlerMethod(met, stale)
dataset/ETHPy150Open treeio/treeio/treeio/core/api/doc.py/HandlerDocumentation.get_methods/original