def __init__(self, userdict):
        self.username = userdict["username"]
        self.password = userdict["password"]
        self.access = {}
        for realm, level in userdict.get("access", {}).items():
            try:
                self.access[realm] = LEVELS.index(level)
            except __HOLE__:
                raise ValueError("Invalid record for user {user}. {level} is not a proper access level.\
                    Choose one of: {levels}.".format(
                        user=self.username,
                        level=level, 
                        levels=", ".join(LEVELS)
                        ))
dataset/ETHPy150Open marchon/Flask-API-Server/apiserver/authentication.py/User.__init__