def encode_netloc(self):
        """Encodes the netloc part to an ASCII safe URL as bytes."""
        rv = self.ascii_host or ""
        if ":" in rv:
            rv = "[%s]" % rv
        port = self.port
        if port is not None:
            rv = "%s:%d" % (rv, port)
        auth = ":".join(
            filter(
                None,
                [
                    url_quote(self.raw_username or "", "utf-8", "strict", "/:%"),
                    url_quote(self.raw_password or "", "utf-8", "strict", "/:%"),
                ],
            )
        )
        if auth:
            rv = "%s@%s" % (auth, rv)
        return to_native(rv)
Encodes the netloc part to an ASCII safe URL as bytes.
Solutions/CyberArkAudit/Data Connectors/.python_packages/lib/site-packages/azure/functions/_thirdparty/werkzeug/urls.py