input: 
  import string
  import random
  
  def generate_random_string(length: int = 8) -> str:
      """Generate a random string of the specified length, made of uppercase letters and numbers.
      >>> generate_random_string(8)
      'K8P2X3Q4'
      >>> generate_random_string(10)
      '6B7J3L8M5N'
      """
      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))