def METHOD_NAME(self, parts) -> None:
    if not parts:
        raise UnsupportedOperation("can't rmdir FileCollection.root")
    parent_files, parent_dirs = self.get_direntries(parts[:-1])
    name = parts[-1]
    if name in parent_files:
        raise NotADirectoryError(b'/'.join(parts))
    try:
        files, subdirs = parent_dirs[name]
    except KeyError:
        raise FileNotFoundError(b'/'.join(parts)) from None
    if files or subdirs:
        raise IOError("Directory not empty: " +
                      b'/'.join(parts).decode(errors='replace'))
    del parent_dirs[name]