<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _validate_address(self, address):
 """Confirm that supplied address is a valid URL and has an `amqp` or `amqps` scheme. :param address: The endpiont URL. :type address: str :rtype: ~urllib.parse.ParseResult """

        parsed = compat.urlparse(address)
        if not parsed.path:
            raise ValueError("Invalid {} address: {}".format(
                self.__class__.__name__, parsed))
        return parsed