<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_cookie_domain(self, app: 'Quart') -> Optional[str]: """Helper method to return the Cookie Domain for the App."""

        if app.config['SESSION_COOKIE_DOMAIN'] is not None:
            return app.config['SESSION_COOKIE_DOMAIN']
        elif app.config['SERVER_NAME'] is not None:
            return '.' + app.config['SERVER_NAME'].rsplit(':', 1)[0]
        else:
            return None