<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def plot_topo(axis, topo, topomap, crange=None, offset=(0,0), plot_locations=True, plot_head=True):
 """Draw a topoplot in given axis. .. note:: Parameter `topo` is modified by the function by calling :func:`~eegtopo.topoplot.Topoplot.set_map`. Parameters axis : axis Axis to draw into. topo : :class:`~eegtopo.topoplot.Topoplot` This object draws the topo plot topomap : array, shape = [w_pixels, h_pixels] Scalp-projected data crange : [int, int], optional Range of values covered by the colormap. If set to None, [-max(abs(topomap)), max(abs(topomap))] is substituted. offset : [float, float], optional Shift the topo plot by [x,y] in axis units. plot_locations : bool, optional Plot electrode locations. plot_head : bool, optional Plot head cartoon. Returns ------- h : image Image object the map was plotted into """

    topo.set_map(topomap)
    h = topo.plot_map(axis, crange=crange, offset=offset)
    if plot_locations:
        topo.plot_locations(axis, offset=offset)
    if plot_head:
        topo.plot_head(axis, offset=offset)
    return h