code: def _results_dir_path(self, key, stable):
      
      # TODO: Shorten cache_key hashes in general?
      return os.path.join(
        self._results_dir_prefix,
        key.id,
        self._STABLE_DIR_NAME if stable else sha1(key.hash.encode('utf-8')).hexdigest()[:12]
      )
docs: Return a results directory path for the given key.
  
      :param key: A CacheKey to generate an id for.
      :param stable: True to use a stable subdirectory, false to use a portion of the cache key to
        generate a path unique to the key.