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