<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def XML_fromstring(content, source=None):
 """Parses the XML string into a node tree. If an ParseError exception is raised, the error message is formatted nicely to show the badly formed XML to the user. """

    try:
        tree = ET.fromstring(content)
    except ET.ParseError as err:
        x_parse_error(err, content, source)
    return tree