def METHOD_NAME(self, plaintext, rounds=12):
    """Sets the password for the user. The password hash is created with the
    Bcrypt python library (http://www.mindrot.org/projects/py-bcrypt/).
    Args:
        plaintext: The plaintext password to hash
        rounds: Number of rounds to use for the bcrypt hashing
    """
    password_hash = generate_password_hash(plaintext, rounds)
    if isinstance(password_hash, six.binary_type):
        password_hash = codecs.decode(password_hash, "utf-8")
    self.password = password_hash