def init():
    """Reference the database and enforce the design document."""
    global _db

    if _db: return

    # That's in case we are hosted in Heroku...
    couch_url = os.environ.get("CLOUDANT_URL")
    if couch_url:
        kwargs = {"url": couch_url}
    else:
        kwargs = {}

    server = couchdb.Server(**kwargs)
    if server not in "vimpaste":
        print("Creating initial database.")
        _db = server.create("vimpaste")
    else:
        _db = server["vimpaste"]

    # Make sure the design docs are in place.
    current_design = _db.get("_design/usage")
    if not current_design:
        print("Creating initial design document.")
        _db.save(design)
    elif current_design["views"] != design["views"]:
        print("Updating design document...")
        new_design = current_design.copy()
        new_design["views"] = design["views"]
        _db.save(new_design)
dataset/ETHPy150Open tamentis/vimpaste/vimpaste/db.py/init/swapped operands of `not in`