input: Write a python function to generate a unique user ID of specified length.
  assert len(generate_user_id(8)) == 8
  assert len(generate_user_id(12)) == 12
  assert isinstance(generate_user_id(10), str)
output: import random
  import string
  
  def generate_user_id(length):
      return ''.join(random.choices(string.ascii_letters + string.digits, k=length))