def _reset_cache(self, key: (str | None)=None) -> None:
    '\n        Reset cached properties. If ``key`` is passed, only clears that key.\n        '
    if (not hasattr(self, '_cache')):
        return
    if (key is None):
        self._cache.clear()
    else:
        self._cache.pop(key, None)
Reset cached properties. If ``key`` is passed, only clears that key.
def _reset_cache(self, key: (str | None)=None) -> None:
    '\n        \n        '
    if (not hasattr(self, '_cache')):
        return
    if (key is None):
        self._cache.clear()
    else:
        self._cache.pop(key, None)