input: 
  import string
  import random
  
  def generate_random_string(length: int = 8) -> str:
      """Generate a random string of given length made of uppercase letters and numbers.
      >>> generate_random_string(8)
      'A3B5F7Z2'  # Example output
      >>> generate_random_string(10)
      '8X9Y2Z1W4K'  # Example output
      """
      chars = string.ascii_uppercase + string.digits
      return ''.join(random.choice(chars) for i in range(length))
  
output:     chars = string.ascii_uppercase + string.digits
      return ''.join(random.choice(chars) for i in range(length))