<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse(self, xml_str):
 # type: (str) -> List[EndpointDescription] """ Parses an EDEF XML string :param xml_str: An XML string :return: The list of parsed EndpointDescription """

        # Parse the document
        root = ElementTree.fromstring(xml_str)
        if root.tag != TAG_ENDPOINT_DESCRIPTIONS:
            raise ValueError("Not an EDEF XML: {0}".format(root.tag))

        # Parse content
        return [
            self._parse_description(node)
            for node in root.findall(TAG_ENDPOINT_DESCRIPTION)
        ]