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