input: Write a function to generate a random string of length 8 made of uppercase letters and numbers. Return the generated string.
  import string
  import random
  
  length = 8
  chars = string.ascii_uppercase + string.digits
  password = ''.join(random.choice(chars) for i in range(length))
  
  assert len(password) == 8
  assert all(c in string.ascii_uppercase + string.digits for c in password)
output: import string
  import random
  
  def generate_random_string():
      length = 8
      chars = string.ascii_uppercase + string.digits
      return ''.join(random.choice(chars) for i in range(length))