code: def generate(self, uppercase: int = None) -> list:
          
          if (
                  self.amount_n is None
                  or self.amount_w is None
                  or not self.wordlist
          ):
              raise ValueError("Can't generate passphrase: "
                               "wordlist is empty or amount_n or "
                               "amount_w isn't set")
  
          if uppercase is not None and not isinstance(uppercase, int):
              raise TypeError('uppercase must be an integer number')
  
          passphrase = []
          for _ in range(0, self.amount_w):
              passphrase.append(randchoice(self.wordlist).lower())
  
          # Handle uppercase
          lowercase = Aux.lowercase_count(passphrase)
          if passphrase and uppercase is not None:
              if (
                      uppercase < 0
                      and lowercase > (uppercase * -1)
              ):
                  uppercase = lowercase + uppercase
  
              # If it's still negative, then means no uppercase
              if uppercase == 0 or uppercase > lowercase:
                  # Make it all uppercase
                  passphrase = Aux.make_all_uppercase(passphrase)
              elif uppercase > 0:
                  passphrase = Aux.make_chars_uppercase(
                      passphrase,
                      uppercase
                  )
  
          # Handle numbers
          for _ in range(0, self.amount_n):
              passphrase.append(randbetween(MIN_NUM, MAX_NUM))
  
          self.last_result = passphrase
          return passphrase
docs: Generate a list of words randomly chosen from a wordlist.
  
          Keyword arguments:
          uppercase -- An integer number indicating how many uppercase
          characters are wanted: bigger than zero means that many characters and
          lower than zero means all uppercase except that many. Use 0 to make
          them all uppercase, and None for no one.