input: def generate_password() -> str:
      """Generates a random password consisting of 8 characters.
      >>> password = generate_password()
      >>> len(password)
      8
      >>> all(c in string.ascii_letters + string.digits for c in password)
      True
      """
      import string
      import random
      chars = string.ascii_letters + string.digits
      return ''.join(random.choice(chars) for _ in range(8))
output:     import string
      import random
      chars = string.ascii_letters + string.digits
      return ''.join(random.choice(chars) for _ in range(8))