input: def generate_random_string(length: int) -> str:
      """
      Generate a random string of the specified length made of uppercase letters and numbers.
      
      >>> generate_random_string(8)  # Example output: 'A3B7Z9R2'
      """
output:     import random
      import string
      
      characters = string.ascii_uppercase + string.digits
      return ''.join(random.choice(characters) for _ in range(length))