libraries/botbuilder-azure/botbuilder/azure/cosmosdb_storage.py
def __sanitize_key(self, key) -> str:
        """Return the sanitized key.

        Replace characters that are not allowed in keys in Cosmos.

        :param key:
        :return str:
        """
        # forbidden characters
        bad_chars = ['\\', '?', '/', '#', '\t', '\n', '\r']
        # replace those with with '*' and the
        # Unicode code point of the character and return the new string
        return ''.join(
            map(
                lambda x: '*'+str(ord(x)) if x in bad_chars else x, key
                )
            )
def __sanitize_key(self, key) -> str:
        # forbidden characters
        bad_chars = ['\\', '?', '/', '#', '\t', '\n', '\r']
        # replace those with with '*' and the
        # Unicode code point of the character and return the new string
        return ''.join(
            map(
                lambda x: '*'+str(ord(x)) if x in bad_chars else x, key
                )
            )
def __sanitize_key ( self , key ) -> str : # forbidden characters bad_chars = [ '\\' , '?' , '/' , '#' , '\t' , '\n' , '\r' ] # replace those with with '*' and the # Unicode code point of the character and return the new string return '' . join ( map ( lambda x : '*' + str ( ord ( x ) ) if x in bad_chars else x , key ) )
Return the sanitized key.

        Replace characters that are not allowed in keys in Cosmos.

        :param key:
        :return str:
Return the sanitized key .