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