input: Write a python function to generate a random password containing at least one capital letter, one number, and one symbol.
  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())
  assert any(c.islower() for c in generate_password())
output: import random
  import string
  
  def generate_password(length=12):
      if length < 4:
          raise ValueError("Password length should be at least 4 characters")
          
      password_characters = [
          random.choice(string.ascii_uppercase),  # At least one uppercase letter
          random.choice(string.digits),           # At least one digit
          random.choice(string.punctuation),      # At least one symbol
          random.choice(string.ascii_lowercase)   # At least one lowercase letter
      ]
      
      if length > 4:
          password_characters += random.choices(
              string.ascii_letters + string.digits + string.punctuation, 
              k=length-4
          )
      
      random.shuffle(password_characters)
      return ''.join(password_characters)