async def METHOD_NAME(self, user):
    self.user_index[user.get('username')] = "user:" + str(user.get('id'))
    if user.get('pwd') is not None:
        password = mk_pwd_hash_default(user.get('pwd'))
    else:
        password = None
    await self.set("user:" + str(user.get('id')), dict(
        id="user:" + str(user.get('id')),
        username=user.get('username'),
        firstname=user.get('firstname'),
        lastname=user.get('lastname'),
        email=user.get('email'),
        pwd_hash=password))