def remove(path):
    if not os.path.exists(path):
        return

    if os.path.isdir(path):
        return shutil.rmtree(path)

    if os.path.isfile(path):
        return os.remove(path)
Wrapper that switches between os.remove and shutil.rmtree depending on
dataset/ETHPy150Open c-w/Gutenberg/gutenberg/_util/os.py/remove