input: Write a function to generate a random password given a set of letters, numbers, and characters. The function should randomly select characters from a predefined string and return a password of length 8. The function should take no input and return the generated password as a string.
  
  def generate_password():
      import random
      string = "abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()?"
      password = "".join(random.sample(string, 8))
      return password
  
  assert len(generate_password()) == 8
  assert any(char.isdigit() for char in generate_password()) == True
  assert any(char.islower() for char in generate_password()) == True
  assert any(char.isupper() for char in generate_password()) == True
  assert any(char in "!@#$%^&*()?" for char in generate_password()) == True
output: def generate_password():
      import random
      string = "abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()?"
      password = "".join(random.sample(string, 8))
      return password