<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generate_probmodelxml(model, encoding='utf-8', prettyprint=True):
 """ Generate ProbModelXML lines for model. Parameters model : Graph The Bayesian or Markov Model encoding : string (optional) Encoding for text data prettyprint: bool (optional) If True uses line breaks and indenting in output XML. Examples -------- """

    writer = ProbModelXMLWriter(G, encoding=encoding, prettyprint=prettyprint)
    for line in str(writer).splitlines():
        yield line