input: Write a function to generate a random password of length 8, which consists of alphanumeric characters and at least one special character.
  assert generate_password()
  assert generate_password()
  assert generate_password()
  assert generate_password()
  assert generate_password()
output: import random
  import string
  
  def generate_password():
      characters = string.ascii_letters + string.digits + string.punctuation
      while True:
          password = ''.join(random.choice(characters) for _ in range(8))
          if any(c in string.punctuation for c in password):
              return password