input: def generate_password() -> str:
      """Generate a random password consisting of 8 characters.
      
      >>> generate_password()
      'aB3dFgHj'
      >>> generate_password()
      '1ZxW9qLm'
      """
output:     import random
      import string
      
      characters = string.ascii_letters + string.digits
      password = ''.join(random.choice(characters) for _ in range(8))
      return password