code: def add_colorbar(self, **kwargs):
          
          kwargs = kwargs.copy()
          if self._cmap_extend is not None:
              kwargs.setdefault('extend', self._cmap_extend)
          if 'label' not in kwargs:
              kwargs.setdefault('label', label_from_attrs(self.data))
          self.cbar = self.fig.colorbar(self._mappables[-1],
                                        ax=list(self.axes.flat),
                                        **kwargs)
          return self
docs: Draw a colorbar