def to_safe_filename(self, text):
        sub = self.config.lazy_get(SECTION_HEADER, 'invalid_filename_character_sub',
                                   default='')
        sub = safe_decode(sub)
        return ''.join([sub if c in UNSAFE_FILE_CHARS else c for c in text])
Translate string to something that can be safely used as a filename.
dataset/ETHPy150Open vinitkumar/googlecl/src/googlecl/docs/base.py/DocsBaseCL.to_safe_filename