def serialize_base64(attr, **kwargs):
        """Serialize str into base-64 string.

        :param attr: Object to be serialized.
        :rtype: str
        """
        encoded = b64encode(attr).decode("ascii")
        return encoded.strip("=").replace("+", "-").replace("/", "_")
Serialize str into base-64 string.

        :param attr: Object to be serialized.
        :rtype: str
        
Solutions/CyberArkAudit/Data Connectors/.python_packages/lib/site-packages/azure/monitor/ingestion/_serialization.py