docs: def _cached_stan_fit(model_name='anon_model', file=None, model_code=None,
                      force=False, cache_dir=None, cache_only=None, 
                       fit_cachefile=None, **kwargs):
      ''' Cache fit stan model, by storing pickled objects in filesystem
      
      per following warning:
        07: UserWarning: Pickling fit objects is an experimental feature!
          The relevant StanModel instance must be pickled along with this fit object.
          When unpickling the StanModel must be unpickled first.
          pickle.dump(obj, f, pickle.HIGHEST_PROTOCOL)
      '''
      if fit_cachefile and cache_only is None:
          cache_only = True
      model_cachefile, fit_cachefile = cached_stan_file(model_name=model_name, file=file, model_code=model_code,
                                                        cache_dir=cache_dir, fit_cachefile=fit_cachefile,
                                                        include_modelfile=True, **kwargs)
      cache_dir = _get_cache_dir(cache_dir)
      model_name = _sanitize_model_name(model_name)
      model_code = _get_model_code(model_code=model_code, file=file)
      logger.info('Step 1: Get compiled model code, possibly from cache')
      stan_model = cached(func=pystan.StanModel,
                           cache_filename=model_cachefile,
                           model_code=model_code,
                           cache_dir=cache_dir,
                           model_name=model_name,
                           cache_only=cache_only,
                           force=force)
      
      ## either pull fitted model from cache, or fit model
      logger.info('Step 2: Get posterior draws from model, possibly from cache')
      fit = cached(func=stan_model.sampling,
                    cache_filename=fit_cachefile,
                    cache_dir=cache_dir,
                    force=force,
                    cache_only=cache_only,
                    **kwargs)
      return fit