input: Write a python function to generate a password containing at least one lowercase letter, one uppercase letter, one digit, and one special character, and then shuffle it randomly.
  assert len(generate_password()) == 8
  assert any(c.islower() for c in generate_password())
  assert any(c.isupper() for c in generate_password())
  assert any(c.isdigit() for c in generate_password())
  assert any(c in string.punctuation for c in generate_password())
output: import random
  import string
  
  def generate_password():
      lowercase = random.choice(string.ascii_lowercase)
      uppercase = random.choice(string.ascii_uppercase)
      digit = random.choice(string.digits)
      special_char = random.choice(string.punctuation)
      
      remaining_chars = random.choices(string.ascii_letters + string.digits + string.punctuation, k=4)
      
      password_list = [lowercase, uppercase, digit, special_char] + remaining_chars
      random.shuffle(password_list)
      
      return ''.join(password_list)