old_contents: """
  Initialize Flask app.
  """
  
  from flask import Flask
  
  import os
  from werkzeug.debug import DebuggedApplication
  
  app = Flask('app') #pylint: disable=invalid-name
  
  from app.models import MODEL_BLUEPRINT
  from app import constants
  from app import exceptions
  from app import utils
  from app import api
  from app import auth
  from app.seed import seed
  
  app.register_blueprint(MODEL_BLUEPRINT)
  DEBUG = (os.environ['SERVER_SOFTWARE'].startswith('Dev')
           if 'SERVER_SOFTWARE' in os.environ
           else True)
  TESTING = os.environ["FLASK_CONF"] == "TEST" if "FLASK_CONF" in os.environ else False
  if not TESTING and len(list(models.Course.query().filter(models.Course.name == 'CS 61A'))) == 0:
      seed()
  
  if DEBUG:
      app.config.from_object('app.settings.Debug')
  
      # Google app engine mini profiler
      # https://github.com/kamens/gae_mini_profiler
      app.wsgi_app = DebuggedApplication(app.wsgi_app, evalex=True)
  else:
      app.config.from_object('app.settings.Production')
  
  # Enable jinja2 loop controls extension
  app.jinja_env.add_extension('jinja2.ext.loopcontrols')
  
  # Pull in URL dispatch routes
  import urls
  
  # Import the authenticator. Central usage place.
  import authenticator
  
new_contents: """
  Initialize Flask app.
  """
  
  from flask import Flask
  
  import os
  from werkzeug.debug import DebuggedApplication
  
  app = Flask('app') #pylint: disable=invalid-name
  
  from app.models import MODEL_BLUEPRINT
  from app import constants
  from app import exceptions
  from app import utils
  from app import api
  from app import auth
  from app.seed import seed
  
  app.register_blueprint(MODEL_BLUEPRINT)
  DEBUG = (os.environ['SERVER_SOFTWARE'].startswith('Dev')
           if 'SERVER_SOFTWARE' in os.environ
           else True)
  TESTING = os.environ["FLASK_CONF"] == "TEST" if "FLASK_CONF" in os.environ else False
  if DEBUG and not TESTING and len(list(models.Course.query().filter(models.Course.name == 'CS 61A'))) == 0:
      seed()
  
  if DEBUG:
      app.config.from_object('app.settings.Debug')
  
      # Google app engine mini profiler
      # https://github.com/kamens/gae_mini_profiler
      app.wsgi_app = DebuggedApplication(app.wsgi_app, evalex=True)
  else:
      app.config.from_object('app.settings.Production')
  
  # Enable jinja2 loop controls extension
  app.jinja_env.add_extension('jinja2.ext.loopcontrols')
  
  # Pull in URL dispatch routes
  import urls
  
  # Import the authenticator. Central usage place.
  import authenticator
  
subject: fix DEBUG for __init__.py