def METHOD_NAME(
    self, cache_key: Hashable
) -> Optional[ICompletionContextDependencyGraph]:
    with self._lock:
        ret = self._cached.get(cache_key)
        if ret is not None:
            self.cache_hits += 1
        if BaseOptions.DEBUG_CACHE_DEPS:
            if ret is not None:
                log.info(
                    "Cache HIT (%s):\n%s\n",
                    cache_key,
                    json.dumps(ret.to_dict(), indent=4),
                )
            else:
                log.info(
                    "Cache MISS (%s):\n%s\n",
                    cache_key,
                    "  \n".join(
                        json.dumps(x.to_dict(), indent=4)
                        for x in self._cached.values()
                    ),
                )
        return ret