<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def createFromURL(urlOfXMLDefinition):
 """Factory method to create a DeviceTR64 from an URL to the XML device definitions. :param str urlOfXMLDefinition: :return: the new object :rtype: Wifi """

        url = urlparse(urlOfXMLDefinition)

        if not url.port:
            if url.scheme.lower() == "https":
                port = 443
            else:
                port = 80
        else:
            port = url.port

        return Wifi(url.hostname, port, url.scheme)