Updated custom formatter example to reflect best practices