can I use a decorator within a code? as part of a function instead of outside of it?