code: def getenv_escaped(key: str, default: str = None) -> Optional[str]:
      
      value = os.getenv(key, default)
      # noinspection PyDeprecation
      return cgi.escape(value) if value is not None else None
docs: Returns an environment variable's value, CGI-escaped, or ``None``.