<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def colorbar(self, mappable=None, cax=None, ax=None, fraction=0., label=None, emit=True, **kwargs):
 """Add a colorbar to the current `Plot` A colorbar must be associated with an `Axes` on this `Plot`, and an existing mappable element (e.g. an image). Parameters mappable : matplotlib data collection Collection against which to map the colouring cax : `~matplotlib.axes.Axes` Axes on which to draw colorbar ax : `~matplotlib.axes.Axes` Axes relative to which to position colorbar fraction : `float`, optional Fraction of original axes to use for colorbar, give `fraction=0` to not resize the original axes at all. emit : `bool`, optional If `True` update all mappables on `Axes` to match the same colouring as the colorbar. **kwargs other keyword arguments to be passed to the :meth:`~matplotlib.figure.Figure.colorbar` Returns ------- cbar : `~matplotlib.colorbar.Colorbar` the newly added `Colorbar` See Also -------- matplotlib.figure.Figure.colorbar matplotlib.colorbar.Colorbar Examples -------- To plot a simple image and add a colorbar: Colorbars can also be generated by directly referencing the parent axes: """

        # pre-process kwargs
        mappable, kwargs = gcbar.process_colorbar_kwargs(
            self, mappable, ax, cax=cax, fraction=fraction, **kwargs)

        # generate colour bar
        cbar = super(Plot, self).colorbar(mappable, **kwargs)
        self.colorbars.append(cbar)
        if label:  # mpl<1.3 doesn't accept label in Colorbar constructor
            cbar.set_label(label)

        # update mappables for this axis
        if emit:
            ax = kwargs.pop('ax')
            norm = mappable.norm
            cmap = mappable.get_cmap()
            for map_ in ax.collections + ax.images:
                map_.set_norm(norm)
                map_.set_cmap(cmap)

        return cbar