input: Write a function to generate a random string of fixed length made up of uppercase letters and digits. The function should accept the length of the string as an input parameter and return the generated string.
  
  def generate_random_string(length: int) -> str:
      import string
      import random
      chars = string.ascii_uppercase + string.digits
      password = ''.join(random.choice(chars) for i in range(length))
      return password
  
  assert generate_random_string(8) is not None
  assert len(generate_random_string(8)) == 8
  assert set(generate_random_string(8)) <= set(string.ascii_uppercase + string.digits)
output: def generate_random_string(length: int) -> str:
      import string
      import random
      chars = string.ascii_uppercase + string.digits
      password = ''.join(random.choice(chars) for i in range(length))
      return password