input: Write a python function to generate unique IDs with a given length using random and string modules.
  assert len(generate_unique_id(8)) == 8
  assert len(generate_unique_id(12)) == 12
  assert isinstance(generate_unique_id(10), str)
output: import random
  import string
  
  def generate_unique_id(length):
      characters = string.ascii_letters + string.digits
      return ''.join(random.choice(characters) for _ in range(length))