def to_safe_filename(self, text):
        """Translate string to something that can be safely used as a filename.

        Behavior of this function depends on the operating system.

        Args:
          text: Text to check for invalid characters
        Returns:
          Parameter with unsafe characters escaped or removed.
          Type (unicode vs string)will match that of the parameter.
        """
        sub = self.config.lazy_get(SECTION_HEADER, 'invalid_filename_character_sub',
                                   default='')
        sub = safe_decode(sub)
        return ''.join([sub if c == UNSAFE_FILE_CHARS else c for c in text])
dataset/ETHPy150Open vinitkumar/googlecl/src/googlecl/docs/base.py/DocsBaseCL.to_safe_filename/operator `in` -> `==`