def create_password(self, arg):
        if not self.password:
            if arg in BAD_PASSWORDS:
                self.player.update_output(CLEAR + '\r\nThat\'s a reserved word. Pick a different password: ' + CONCEAL)
            else:    
                self.password = hashlib.sha1(arg).hexdigest()
                self.player.update_output(CLEAR + 'Re-enter your password to confirm: ' + CONCEAL)
        else:
            if self.password == hashlib.sha1(arg).hexdigest():
                self.save['password'] = self.password
                if not self.newbie:
                    self.player.update_output(CLEAR + "Your new password has been saved.")
                    self.state = self.character_cleanup
                else:
                    self.next_state = self.choose_gender
                    self.player.update_output(CLEAR + "What gender shall your character be? " +\
                                                    "Choose from: neutral, female, or male.")
                    self.player.update_output('Gender: ')
            else:
                self.player.update_output(CLEAR + 'Passwords did not match.')
                self.player.update_output('Please choose a password: ' + CONCEAL)
                self.password = None
The player is choosing a password for their new character.
dataset/ETHPy150Open shinymud/ShinyMUD/src/shinymud/modes/init_mode.py/InitMode.create_password