def mkdir_p(path):
    """Creates a directory and any parent directories that may need to
    be created along the way, without raising errors for any existing
    directories. This function mimics the behavior of the ``mkdir -p``
    command available in Linux/BSD environments, but also works on
    Windows.
    """
    try:
        os.makedirs(path)
    except __HOLE__ as exc:
        if exc.errno == errno.EEXIST and os.path.isdir(path):
            return
        raise
    return
dataset/ETHPy150Open mahmoud/boltons/boltons/fileutils.py/mkdir_p