def _get_decorator_names(fun):
    """Get decorator names from the function.

    Args:
        fun: The function whose decorators we are getting.

    Returns:
        The names of the decorators. Does not include setters and
        getters.

    """
    ret = list()
    for decorator in fun.decorator_list:
        if hasattr(decorator, 'id'):
            ret.append(getattr(decorator, 'id'))
    return ret
