code: def init_manager(app, db, **kwargs):
      
      manager.app = app
      manager.db = db
      manager.context = kwargs
      manager.add_command('db', MigrateCommand)
      manager.add_command('clean', Clean())
      manager.add_command('showurls', ShowUrls())
      manager.add_command('shell', Shell(make_context=shell_context))
      manager.add_command('plainshell', Shell(make_context=shell_context,
          use_ipython=False, use_bpython=False))
      return manager
docs: Initialise Manager
  
      :param app: Flask app object
      :parm db: db instance
      :param kwargs: Additional keyword arguments to be made available as shell context