def get_mongo_uri_template(self, db=None):
        if not db:
            if self.is_auth():
                db = "/[dbname]"
            else:
                db = ""
        else:
            db = "/" + db

        creds = "[dbuser]:[dbpass]@" if self.is_auth() else ""
        return (creds, self.get_address_display(), db) % "mongodb://%s%s%s"

    ###########################################################################
dataset/ETHPy150Open mongolab/mongoctl/mongoctl/objects/mongod.py/MongodServer.get_mongo_uri_template/swapped operands of `%`