<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_plotbounds(self, coord, kind=None, ignore_shape=False):
 """ Get the bounds of a coordinate This method first checks the ``'bounds'`` attribute of the given `coord` and if it fails, it calculates them. Parameters coord: xarray.Coordinate The coordinate to get the bounds for kind: str The interpolation method (see :func:`scipy.interpolate.interp1d`) that is used in case of a 2-dimensional coordinate ignore_shape: bool If True and the `coord` has a ``'bounds'`` attribute, this attribute is returned without further check. Otherwise it is tried to bring the ``'bounds'`` into a format suitable for (e.g.) the :func:`matplotlib.pyplot.pcolormesh` function. Returns ------- bounds: np.ndarray The bounds with the same number of dimensions as `coord` but one additional array (i.e. if `coord` has shape (4, ), `bounds` will have shape (5, ) and if `coord` has shape (4, 5), `bounds` will have shape (5, 6)"""

        if 'bounds' in coord.attrs:
            bounds = self.ds.coords[coord.attrs['bounds']]
            if ignore_shape:
                return bounds.values.ravel()
            if not bounds.shape[:-1] == coord.shape:
                bounds = self.ds.isel(**self.get_idims(coord))
            try:
                return self._get_plotbounds_from_cf(coord, bounds)
            except ValueError as e:
                warn((e.message if six.PY2 else str(e)) +
                     " Bounds are calculated automatically!")
        return self._infer_interval_breaks(coord, kind=kind)