Add a method to format the name of a metric (with tests!)