input: Write a python function to generate a random password of length 8 containing uppercase letters, lowercase letters, symbols, and numbers.
  assert len(generate_password()) == 8
  assert any(c.isupper() for c in generate_password())
  assert any(c.islower() for c in generate_password())
  assert any(c in '!@#$%^&*' for c in generate_password())
  assert any(c.isdigit() for c in generate_password())
output: import random
  import string
  
  def generate_password():
      characters = string.ascii_letters + string.digits + '!@#$%^&*'
      password = [
          random.choice(string.ascii_uppercase),
          random.choice(string.ascii_lowercase),
          random.choice('!@#$%^&*'),
          random.choice(string.digits)
      ] + [random.choice(characters) for _ in range(4)]
      random.shuffle(password)
      return ''.join(password)