docs: def cached_model_file(model_name='anon_model', file=None, model_code=None, cache_dir=None,
                        fit_cachefile=None, include_prefix=False):
      ''' Given model name & stan model code/file, compute path to cached stan fit
          
          if include_prefix, returns (model_prefix, model_cachefile)
      '''
      cache_dir = _get_cache_dir(cache_dir)
      model_name = _sanitize_model_name(model_name)
      ## compute model prefix
      if file:
          model_code = _read_file(file)
      if model_code:
          model_prefix = '.'.join([model_name, _make_digest(dict(model_code=model_code,
                                                                 pystan=pystan.__version__,
                                                                 cython=Cython.__version__))])
      else: ## handle case where no model code given
          if file is not None:
              logger.info('Note - no model code detected from given file: {}'.format(file))
          else:
              logger.info('Note - no model code detected (neither file nor model_code given)')
      ## parse model_prefix from fit_cachefile if given
      if fit_cachefile:
          # if necessary, impute cache_dir from filepath
          if fit_cachefile != os.path.basename(fit_cachefile):
              cache_dir, fit_cachefile = os.path.split(os.path.abspath(fit_cachefile))
          # if fit_cachefile given, parse to get fit_model_prefix
          fit_model_prefix = re.sub(string=os.path.basename(fit_cachefile), pattern='(.*).stanfit.*', repl='\\1')
          if model_code:
              if fit_model_prefix != model_prefix:
                  logger.warning('Computed model prefix does not match that used to estimate model. Using prefix matching fit_cachefile')
          model_prefix = fit_model_prefix
      # compute path to model cachefile
      model_cachefile = '.'.join([model_prefix, 'stanmodel', 'pkl'])
      if include_prefix:
          return model_prefix, model_cachefile
      return model_cachefile