input: def generate_random_string(length: int) -> str:
      """ Generates a random string of given length consisting of alphanumeric characters.
      >>> generate_random_string(10) # Length: 10
      'a1B2c3D4e5'
      >>> generate_random_string(5)  # Length: 5
      'X9yZ8'
      """
      import random
      random_characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
      random_string = ''.join(random.choices(random_characters, k=length))
      return random_string
output:     import random
      random_characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
      random_string = ''.join(random.choices(random_characters, k=length))
      return random_string