<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(histogram: HistogramBase, kind: Optional[str] = None, backend: Optional[str] = None, **kwargs):
 """Universal plotting function. All keyword arguments are passed to the plotting methods. Parameters """

    backend_name, backend = _get_backend(backend)
    if kind is None:
        kinds = [t for t in backend.types if histogram.ndim in backend.dims[t]]
        if not kinds:
            raise RuntimeError("No plot type is supported for {0}"
                               .format(histogram.__class__.__name__))
        kind = kinds[0]
    if kind in backend.types:
        method = getattr(backend, kind)
        return method(histogram, **kwargs)
    else:
        raise RuntimeError("Histogram type error: {0} missing in backend {1}"
                           .format(kind, backend_name))