code: def setpassword(self, pwd):
          
          if pwd and not isinstance(pwd, bytes):
              raise TypeError("pwd: expected bytes, got %s" % type(pwd))
          if pwd:
              self.pwd = pwd
          else:
              self.pwd = None
docs: Set default password for encrypted files.