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