Move main logic of _render_part to stand-alone function format_header_param.