input: def generate_password() -> str:
      """
      Generates a random password of length 8, which consists of alphanumeric characters
      and at least one special character.
      >>> generate_password()
      'aB3!cD7e'
      >>> generate_password()
      '1Fg@2Hj8'
      """
output:     import random
      import string
  
      while True:
          password = ''.join(random.choices(string.ascii_letters + string.digits, k=8))
          if any(c in string.punctuation for c in password):
              return password