input: Write a function to generate random passwords that consist of 8 characters. The function should not take any input parameters and should return a string representing the password.
  
  
  import string
  import random
  
  def generate_password():
      chars = string.ascii_letters + string.digits
      return ''.join(random.choice(chars) for _ in range(8))
  
  assert len(generate_password()) == 8
  assert any(c in string.ascii_lowercase for c in generate_password())
  assert any(c in string.ascii_uppercase for c in generate_password())
  assert any(c in string.digits for c in generate_password())
  
output: import string
  import random
  
  def generate_password():
      chars = string.ascii_letters + string.digits
      return ''.join(random.choice(chars) for _ in range(8))