input: Write a python function to generate a password that contains at least one lowercase letter, one uppercase letter, one digit, and one special character. 
  assert len([c for c in generate_password() if c.islower()]) > 0
  assert len([c for c in generate_password() if c.isupper()]) > 0
  assert len([c for c in generate_password() if c.isdigit()]) > 0
  assert len([c for c in generate_password() if c in string.punctuation]) > 0
output: import random
  import string
  
  def generate_password(length=12):
      if length < 4:
          raise ValueError("Password length must be at least 4 characters")
      
      lower = random.choice(string.ascii_lowercase)
      upper = random.choice(string.ascii_uppercase)
      digit = random.choice(string.digits)
      special = random.choice(string.punctuation)
      
      remaining_chars = [
          random.choice(string.ascii_letters + string.digits + string.punctuation)
          for _ in range(length - 4)
      ]
      
      password_list = [lower, upper, digit, special] + remaining_chars
      random.shuffle(password_list)
      
      return ''.join(password_list)