input: def generate_password(min_length: int) -> str:
      """ Generate a random password with a minimum length of 8 characters,
      containing at least one number and one special character.
      >>> generate_password(8)
      'A1b2!@#$'
      >>> generate_password(12)
      'Z9x8@#%^&*()'
      """
      chars = string.ascii_letters + string.digits + string.punctuation
      password = "".join(random.choice(chars) for i in range(min_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 i in range(min_length))
      return password
output:     import random
      import string