<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fromDiscoveryResult(cls, discoveryResult):
 """Create endpoints from a DiscoveryResult. @type discoveryResult: L{DiscoveryResult} @rtype: list of L{OpenIDServiceEndpoint} @raises XRDSError: When the XRDS does not parse. @since: 2.1.0 """

        if discoveryResult.isXRDS():
            method = cls.fromXRDS
        else:
            method = cls.fromHTML
        return method(discoveryResult.normalized_uri,
                      discoveryResult.response_text)