def serialize_unicode(cls, data):
        """Special handling for serializing unicode strings in Py2.
        Encode to UTF-8 if unicode, otherwise handle as a str.

        :param data: Object to be serialized.
        :rtype: str
        """
        try:  # If I received an enum, return its value
            return data.value
        except AttributeError:
            pass

        try:
            if isinstance(data, unicode):  # type: ignore
                # Don't change it, JSON and XML ElementTree are totally able
                # to serialize correctly u'' strings
                return data
        except NameError:
            return str(data)
        else:
            return str(data)
Special handling for serializing unicode strings in Py2.
        Encode to UTF-8 if unicode, otherwise handle as a str.

        :param data: Object to be serialized.
        :rtype: str
        
Solutions/CyberArkAudit/Data Connectors/.python_packages/lib/site-packages/azure/storage/blob/_generated/_serialization.py