input: def generate_random_password(length: int = 8) -> str:
      """ Generate a random password of given length, containing at least one of each character type:
      lowercase, uppercase, digits, and special characters.
      >>> generate_random_password(8)
      'A1b@c2D%'
      """
      import string
      import random
  
      # special characters
      special_characters = "!#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"
  
      # generating password
      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
      password += ''.join(random.choice(all_characters) for i in range(length - 4))
      
      password_list = list(password)
      random.shuffle(password_list)
      password = ''.join(password_list)
  
      return password
output:     import string
      import random
  
      # special characters
      special_characters = "!#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"
  
      # generating password
      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
      password += ''.join(random.choice(all_characters) for i in range(length - 4))
      
      password_list = list(password)
      random.shuffle(password_list)
      password = ''.join(password_list)
  
      return password