input: Below is an instruction that describes a task. Write a response that appropriately completes the request.
  
  ### Input:
  length = 8
  chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
  
  ### Output:
  def generate_random_string(length: int, chars: str) -> str:
      """ Generate a random string of specified length using the characters from the given string.
      >>> generate_random_string(8, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789')
      'A1B2C3D4'  # Example output
      >>> generate_random_string(8, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789')
      '5E6F7G8H'  # Example output
      """
      return ''.join(random.choice(chars) for _ in range(length))
output:     import random
      return ''.join(random.choice(chars) for _ in range(length))