input: Write a python function to generate a random password of length 8.
  assert len(generate_password()) == 8
  assert isinstance(generate_password(), str)
  assert any(char.isdigit() for char in generate_password())
  assert any(char.islower() for char in generate_password())
  assert any(char.isupper() for char in generate_password())
  assert any(char in "@#$%^&*" for char in generate_password())
output: import random
  import string
  
  def generate_password():
      characters = string.ascii_letters + string.digits + "@#$%^&*"
      password = [
          random.choice(string.ascii_lowercase),
          random.choice(string.ascii_uppercase),
          random.choice(string.digits),
          random.choice("@#$%^&*"),
      ]
      password += random.choices(characters, k=4)
      random.shuffle(password)
      return ''.join(password)