code: def modelpath4file(filename, ext:str='.tgz'):
      "Return model path to `filename`, checking locally first then in the config file."
      local_path = URLs.LOCAL_PATH/'models'/filename
      if local_path.exists() or local_path.with_suffix(ext).exists(): return local_path
      else: return Config.model_path()/filenamf modelpath4file(filename, ext:str='.tgz'):
      "Return model path to `filename`, checking locally first then in the config file."
      local_path = URLs.LOCAL_PATH/'models'/filename
      if local_path.exists() or local_path.with_suffix(ext).exists(): return local_path
      else: return Config.model_path()/filename
docs: Return model path to `filename`, checking locally first then in the config file.