def _le_diamond(self, annot, p1, p2, lr):
m, im, L, R, w, scol, fcol, opacity = self._le_annot_parms(annot, p1, p2)<EOL>shift = <NUM_LIT>             <EOL>d = shift * max(<NUM_LIT:1>, w)<EOL>M = R - (d/<NUM_LIT>, <NUM_LIT:0>) if lr else L + (d/<NUM_LIT>, <NUM_LIT:0>)<EOL>r = Rect(M, M) + (-d, -d, d, d)         <EOL>e square makes line longer by (<NUM_LIT:2>*shift - <NUM_LIT:1>)*width<EOL>p = (r.tl + (r.bl - r.tl) * <NUM_LIT:0.5>) * im<EOL>ap = "<STR_LIT>" % (opacity, p.x, p.y)<EOL>p = (r.tl + (r.tr - r.tl) * <NUM_LIT:0.5>) * im<EOL>ap += "<STR_LIT>"   % (p.x, p.y)<EOL>p = (r.tr + (r.br - r.tr) * <NUM_LIT:0.5>) * im<EOL>ap += "<STR_LIT>"   % (p.x, p.y)<EOL>p = (r.br + (r.bl - r.br) * <NUM_LIT:0.5>) * im<EOL>ap += "<STR_LIT>"   % (p.x, p.y)<EOL>ap += "<STR_LIT>" % w<EOL>ap += scol + fcol + "<STR_LIT>"<EOL>return ap<EOL>
Make stream commands for diamond line end symbol. "lr" denotes left (False) or right point.