ENH: changed the function to _format_output_path