def unregister(self, parent, key=None, return_entry=False):
        """
        Remove entry from directory.
        Returns attributes of deleted DirEntry
        """
        path = self._get_path(parent, key) if key else parent
        log.debug("Removing content at path %s" % path)

        direntry = self._read_by_path(path)
        if direntry:
            self.dir_store.delete(direntry)

        if direntry and not return_entry:
            return direntry.attributes
        else:
            return direntry
dataset/ETHPy150Open ooici/pyon/pyon/ion/directory.py/Directory.unregister/original