resolve_formatter function

Convert user input into label formatting function