@decorators_mod.cachedproperty<EOL><INDENT>def type(self):<DEDENT>
builtin_descriptors = {"<STR_LIT>", "<STR_LIT>"}<EOL>for decorator in self.extra_decorators:<EOL><INDENT>if decorator.func.name in builtin_descriptors:<EOL><INDENT>return decorator.func.name<EOL><DEDENT><DEDENT>frame = self.parent.frame()<EOL>type_name = "<STR_LIT>"<EOL>if isinstance(frame, ClassDef):<EOL><INDENT>if self.name == "<STR_LIT>":<EOL><INDENT>return "<STR_LIT>"<EOL><DEDENT>if sys.version_info >= (<NUM_LIT:3>, <NUM_LIT:6>) and self.name == "<STR_LIT>":<EOL><INDENT>return "<STR_LIT>"<EOL><DEDENT>type_name = "<STR_LIT>"<EOL><DEDENT>if not self.decorators:<EOL><INDENT>return type_name<EOL><DEDENT>for node in self.decorators.nodes:<EOL><INDENT>if isinstance(node, node_classes.Name):<EOL><INDENT>if node.name in builtin_descriptors:<EOL><INDENT>return node.name<EOL><DEDENT><DEDENT>if isinstance(node, node_classes.Call):<EOL><INDENT>try:<EOL><INDENT>current = next(node.func.infer())<EOL><DEDENT>except exceptions.InferenceError:<EOL><INDENT>continue<EOL><DEDENT>_type = _infer_decorator_callchain(current)<EOL>if _type is not None:<EOL><INDENT>return _type<EOL><DEDENT><DEDENT>try:<EOL><INDENT>for inferred in node.infer():<EOL><INDENT>_type = _infer_decorator_callchain(inferred)<EOL>if _type is not None:<EOL><INDENT>return _type<EOL><DEDENT>if not isinstance(inferred, ClassDef):<EOL><INDENT>continue<EOL><DEDENT>for ancestor in inferred.ancestors():<EOL><INDENT>if not isinstance(ancestor, ClassDef):<EOL><INDENT>continue<EOL><DEDENT>if ancestor.is_subtype_of("<STR_LIT>" % BUILTINS):<EOL><INDENT>return "<STR_LIT>"<EOL><DEDENT>if ancestor.is_subtype_of("<STR_LIT>" % BUILTINS):<EOL><INDENT>return "<STR_LIT>"<EOL><DEDENT><DEDENT><DEDENT><DEDENT>except exceptions.InferenceError:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>return type_name<EOL>
The function type for this node.

        Possible values are: method, function, staticmethod, classmethod.

        :type: str