code: def save_apidoc(text: str) -> None:
      
      apidoc_local = local.path(APIDOC_LOCAL_FILE)
      if not apidoc_local.dirname.exists():
          apidoc_local.dirname.mkdir()
      with open(apidoc_local, 'w') as f:
          f.write(text)
docs: save `text` to apidoc cache