input: 
  def generate_random_password(length: int = 8) -> str:
      """ Generate a random password of specified length with at least one of each 
      character type: lowercase, uppercase, digits, and special characters.
      >>> generate_random_password()
      'A3b$1wZ6'
      >>> generate_random_password(12)
      'Z7a#B2x@Q9y&'
      """
      
      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_characters = string.ascii_lowercase + string.ascii_uppercase + string.digits + special_characters
      
      while len(password) < length:
          password += random.choice(all_characters)
      
      password_list = list(password)
      random.shuffle(password_list)
      
      return ''.join(password_list)
  
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_characters = string.ascii_lowercase + string.ascii_uppercase + string.digits + special_characters
      
      while len(password) < length:
          password += random.choice(all_characters)
      
      password_list = list(password)
      random.shuffle(password_list)
      
      return ''.join(password_list)