docs: def new(cls, password, rounds):
          """Creates a PasswordHash from the given password."""
          if isinstance(password, str):
              password = password.encode('utf8')
          value = bcrypt.hashpw(password, bcrypt.gensalt(rounds))
          return cls(value)