input: Write a python function to ensure a directory exists.
  assert ensure_dir_exists('test_dir')==None
  assert os.path.exists('test_dir')==True
  assert ensure_dir_exists('another_test_dir')==None
  assert os.path.exists('another_test_dir')==True
output: import os
  
  def ensure_dir_exists(directory):
      if not os.path.exists(directory):
          os.makedirs(directory)