<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

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