Simple decorator to set attributes of target function or class in a DRY way.