Refactor Coord._format_metadata()