def polyline2pathd(polyline_d, is_polygon=False):
points = COORD_PAIR_TMPLT.findall(polyline_d)<EOL>closed = (float(points[<NUM_LIT:0>][<NUM_LIT:0>]) == float(points[-<NUM_LIT:1>][<NUM_LIT:0>]) and<EOL>float(points[<NUM_LIT:0>][<NUM_LIT:1>]) == float(points[-<NUM_LIT:1>][<NUM_LIT:1>]))<EOL>if is_polygon and closed:<EOL><INDENT>points.append(points[<NUM_LIT:0>])<EOL><DEDENT>d = '<STR_LIT:M>' + '<STR_LIT:L>'.join('<STR_LIT>'.format(x,y) for x,y in points)<EOL>if is_polygon or closed:<EOL><INDENT>d += '<STR_LIT:z>'<EOL><DEDENT>return d<EOL>
converts the string from a polyline points-attribute to a string for a
    Path object d-attribute