Refactor to allow 'ids' be passed to `format_items()` as a formatting argument