input: from typing import List
  
  def generate_random_string(length: int) -> str:
      """ Generate a random string of given length using uppercase letters and numbers.
      >>> generate_random_string(8)
      'A1B2C3D4'
      >>> generate_random_string(8)
      'X9Y8Z7W6'
      """
      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