input: from typing import List
  
  
  def generate_password() -> str:
      """Generate a random password of length 8, which consists of alphanumeric characters and at least one special character.
      >>> generate_password()
      'A1!b2@c3'
      >>> generate_password()
      'D4#e5$f6'
      """
output:     import random
      import string
  
      characters = string.ascii_letters + string.digits + "!@#$%^&*()_+"
      password = ''.join(random.choice(characters) for _ in range(7))
      password += random.choice("!@#$%^&*()_+")
      return ''.join(random.sample(password, len(password)))