def __delitem__(self, name: str) -> None:
        """Delete an item with the given name if it exists."""
        index = self._index_by_name(name)
        if index > -1:
            del self._cache[index]
Delete an item with the given name if it exists.
git/objects/tree.py