<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_model_doc_string(model, doc, override=False):
 """ Sets the doc string of the ONNX model. :param model: instance of an ONNX model :param doc: string containing the doc string that describes the model. :param override: bool if true will always override the doc string with the new value Example: :: from onnxmltools.utils import set_model_doc_string onnx_model = load_model("SqueezeNet.onnx") set_model_doc_string(onnx_model, "Sample doc string") """

    if model is None or not isinstance(model, onnx_proto.ModelProto):
        raise ValueError("Model is not a valid ONNX model.")
    if not convert_utils.is_string_type(doc):
        raise ValueError("Doc must be a string type.")
    if model.doc_string and not doc and override is False:
        raise ValueError("Failing to overwrite the doc string with a blank string, set override to True if intentional.")
    model.doc_string = doc