def METHOD_NAME(url):
    parsed_url = urlparse(url)
    if parsed_url.password:
        sanitized_endpoint = "{}://{}".format(parsed_url.scheme, parsed_url.hostname)
        if parsed_url.port:
            sanitized_endpoint += ":{}".format(parsed_url.port)
        return sanitized_endpoint
    return url