input: from typing import List
  
  def generate_random_password(length: int) -> str:
      """Generate a random password of the specified length that contains at least one of each character type: lowercase letter, uppercase letter, digit, and special character.
      
      >>> generate_random_password(8).isalnum()
      False
      >>> any(c.islower() for c in generate_random_password(8))
      True
      >>> any(c.isupper() for c in generate_random_password(8))
      True
      >>> any(c.isdigit() for c in generate_random_password(8))
      True
      >>> any(c in "!#$%&'()*+,-./:;<=>?@[\]^_`{|}~" for c in generate_random_password(8))
      True
      """
      
      # 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)
      
      for i in range(length - 4):
          password += random.choice(string.ascii_lowercase + string.ascii_uppercase + string.digits + special_characters)
      
      password = ''.join(random.sample(password, len(password)))
      
      return password
output:     
      import random
      import string
  
      # 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)
      
      for i in range(length - 4):
          password += random.choice(string.ascii_lowercase + string.ascii_uppercase + string.digits + special_characters)
      
      password = ''.join(random.sample(password, len(password)))
      
      return password
  