def project_ranges(cb, msg, attributes):
if skip(cb, msg, attributes):<EOL><INDENT>return msg<EOL><DEDENT>plot = get_cb_plot(cb)<EOL>x0, x1 = msg.get('<STR_LIT>', (<NUM_LIT:0>, <NUM_LIT:1000>))<EOL>y0, y1 = msg.get('<STR_LIT>', (<NUM_LIT:0>, <NUM_LIT:1000>))<EOL>extents = x0, y0, x1, y1<EOL>x0, y0, x1, y1 = project_extents(extents, plot.projection,<EOL>plot.current_frame.crs)<EOL>coords = {'<STR_LIT>': (x0, x1), '<STR_LIT>': (y0, y1)}<EOL>return {k: v for k, v in coords.items() if k in attributes}<EOL>
Projects ranges supplied by a callback.