input: 
  def generate_random_password(length: int) -> str:
      """
      Generate a random password of the specified length containing at least one of each character type: 
      lowercase, uppercase, digits, and special characters.
      
      >>> generate_random_password(8)
      'aB1!dE2@'
      >>> generate_random_password(12)
      'xY3#zW7$qR9%'
      """
      import string
      import random
      
      special_characters = "!#$%&'()*+,-./:;<=>?@[\]^_`{|}~"
      
      password = random.choice(string.ascii_lowercase)
      password += random.choice(string.ascii_uppercase)
      password += random.choice(string.digits)
      password += random.choice(special_characters)
      
      all_chars = string.ascii_lowercase + string.ascii_uppercase + string.digits + special_characters
      for i in range(length - 4):
          password += random.choice(all_chars)
      
      password = ''.join(random.sample(password, len(password)))
      
      return password
  
output:     import string
      import random
      
      special_characters = "!#$%&'()*+,-./:;<=>?@[\]^_`{|}~"
      
      password = random.choice(string.ascii_lowercase)
      password += random.choice(string.ascii_uppercase)
      password += random.choice(string.digits)
      password += random.choice(special_characters)
      
      all_chars = string.ascii_lowercase + string.ascii_uppercase + string.digits + special_characters
      for i in range(length - 4):
          password += random.choice(all_chars)
      
      password = ''.join(random.sample(password, len(password)))
      
      return password