input: def generate_password() -> str:
      """ Generate a random password of length 8, which consists of alphanumeric characters 
      and at least one special character.
      >>> generate_password()
      'A3b!8d9K'
      >>> generate_password()
      '2Hj@6L9P'
      """
output:     import random
      import string
  
      while True:
          password = ''.join(random.choices(string.ascii_letters + string.digits, k=8))
          if any(char in string.punctuation for char in password):
              return password