input: Write a function in Python that generates a random 8-character password that must include a mix of uppercase and lowercase letters, digits, and special symbols. The password should be generated using the `random` library in Python.
  
  assert generate_password() in ["T3sT!ngPw", "7qL@Wp0r", "R@nd0mPw2", "XyZ1$wQ2", "P@ssW0rd3"]
  assert len(generate_password())==8
output: import random
  import string
  
  def generate_password():
      characters = string.ascii_letters + string.digits + string.punctuation
      return ''.join(random.choice(characters) for _ in range(8))