def mkdir_p(path):
  '''
  Mimic `mkdir -p` since os module doesn't provide one.

  :param str path: directory to create
  '''
  assert isinstance(path, basestring), ("path must be a string but is %r" % path)
  try:
    os.makedirs(path)
  except OSError as exception:
    if exception.errno != errno.EEXIST:
      raise
Mimic `mkdir -p` since os module doesn't provide one.

  :param str path: directory to create