input: 
  def generate_random_string(length: int) -> str:
      """Generate a random string of specified length containing alphanumeric characters.
      >>> generate_random_string(8)
      'aB3xYz78'
      >>> generate_random_string(8)
      '12345678'
      """
  
output:     import random
      import string
  
      return ''.join(random.choices(string.ascii_letters + string.digits, k=length))