def make_dir_tree(path, ignore_existing=False):
    """
    Creates the specified directory tree. Throws an error
    and doesn't do anything if there are already files in that dir.
    Kind of like 'mkdir -p'.
    Arguments:
        path -- path to be created
    """
    try:
        os.makedirs(path)
    except __HOLE__:
        if os.listdir(path):
            if not ignore_existing:
                raise OSError("Target directory {0} is not empty.".format(path))
            else:
                pass
        else:
            pass
    return
dataset/ETHPy150Open nasa-gibs/onearth/src/test/oe_test_utils.py/make_dir_tree