input: Write a function to generate a random password given a set of letters, numbers, and special characters. The function should return the password as a string. 
  
  assert generate_password() == "c3X&u6A@"
  assert generate_password() == "7d#tKpF8"
  assert generate_password() == "q2!jR5z%"
  assert generate_password() == "9@MmVbW4"
output: import random
  import string
  
  def generate_password():
      letters = string.ascii_letters
      numbers = string.digits
      special_chars = "!@#$%^&*()_+"
      all_chars = letters + numbers + special_chars
      password = ''.join(random.choice(all_chars) for _ in range(8))
      return password