code: def contains(self, key, counter_id):
          
          with self._lock:
              return counter_id in self._metadata[key]
docs: Return whether a counter_id is present for a given instance key.
          If the key is not in the cache, raises a KeyError.