def _get_cache_dir()

in openai_gemm.py [0:0]


def _get_cache_dir(subdir=None):

    cache_dir = appdirs.user_cache_dir("openai-gemm")

    if subdir:
        subdir = subdir if isinstance(subdir, list) else [subdir]
        cache_dir = os.path.join(cache_dir, *subdir)

    if not os.path.exists(cache_dir):
        os.makedirs(cache_dir)

    return cache_dir