input: from typing import List
  
  def generate_password(pwd_length: int) -> str:
      """
      Generate a random password of a specified length, which consists of alphanumeric characters and at least one special character.
  
      >>> generate_password(8)
      'aB3$d9E*'
      >>> generate_password(10)
      '1%FgH2@jK7'
      """
      import string
      import random
  
      chars = string.ascii_letters + string.digits + string.punctuation
  
      while True:
          password = ''.join(random.choice(chars) for _ in range(pwd_length))
          if any(char in string.punctuation for char in password):
              return password
output:     import string
      import random
  
      chars = string.ascii_letters + string.digits + string.punctuation
  
      while True:
          password = ''.join(random.choice(chars) for _ in range(pwd_length))
          if any(char in string.punctuation for char in password):
              return password