<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def body_line_iterator(msg, decode=False):
 """Iterate over the parts, returning string payloads line-by-line. Optional decode (default False) is passed through to .get_payload(). """

    for subpart in msg.walk():
        payload = subpart.get_payload(decode=decode)
        if isinstance(payload, str):
            for line in StringIO(payload):
                yield line