input: Write a python function to generate a random alphanumeric ID of a given length.
  assert len(generate_alphanumeric_id(8)) == 8
  assert len(generate_alphanumeric_id(12)) == 12
  assert len(generate_alphanumeric_id(4)) == 4
output: import random
  import string
  
  def generate_alphanumeric_id(length):
      characters = string.ascii_letters + string.digits
      return ''.join(random.choice(characters) for _ in range(length))