input: from typing import List
  
  def generate_password() -> str:
      """ Generates a random password with a minimum length of 8 characters, containing 
          at least one number and one special character.
      >>> len(generate_password()) == 8 and any(char.isdigit() for char in generate_password()) and any(char in string.punctuation for char in generate_password())
      True
      """
output:     import random
      import string
  
      length = 8
      chars = string.ascii_letters + string.digits + string.punctuation
      password = ''.join(random.choice(chars) for _ in range(length))
      
      while not (any(char.isdigit() for char in password) and any(char in string.punctuation for char in password)):
          password = ''.join(random.choice(chars) for _ in range(length))
      
      return password