This is overly complicated and could be written as `if meta.engine is not None`. Come to think of it, when does each case happen? Ad isn't this whole block a complicated way of writing `config['beaker.session.database_engine'] = meta.engine`?