class_docstr: The environment in which the ReST files are translated.
  Stores an inventory of cross-file targets and provides doctree
  transformations to resolve links to them.
class_docstr_tok: ["The","environment","in","which","the","ReST","files","are","translated",".","Stores","an","inventory","of","cross-file","targets","and","provides","doctree","transformations","to","resolve","links","to","them","."]
docstr: Return (added, changed, removed) sets.
code: def get_outdated_files(
      self, config_changed: bool
  ) -> tuple[set[str], set[str], set[str]]:
      """Return (added, changed, removed) sets."""
      # clear all files no longer present
      removed = set(self.all_docs) - self.found_docs
  
      added: set[str] = set()
      changed: set[str] = set()
  
      if config_changed:
          # config values affect e.g. substitutions
          added = self.found_docs
      else:
          for docname in self.found_docs:
              if docname not in self.all_docs:
                  logger.debug("[build target] added %r", docname)
                  added.add(docname)
                  continue
              # if the doctree file is not there, rebuild
              filename = path.join(
                  self.doctreedir, docname + ".doctree"
              )
              if not path.isfile(filename):
                  logger.debug("[build target] changed %r", docname)
                  changed.add(docname)
                  continue
              # check the "reread always" list
              if docname in self.reread_always:
                  logger.debug("[build target] changed %r", docname)
                  changed.add(docname)
                  continue
              # check the mtime of the document
              mtime = self.all_docs[docname]
              newmtime = _last_modified_time(self.doc2path(docname))
              if newmtime > mtime:
                  logger.debug(
                      "[build target] outdated %r: %s -> %s",
                      docname,
                      _format_modified_time(mtime),
                      _format_modified_time(newmtime),
                  )
                  changed.add(docname)
                  continue
              # finally, check the mtime of dependencies
              for dep in self.dependencies[docname]:
                  try:
                      # this will do the right thing when dep is absolute too
                      deppath = path.join(self.srcdir, dep)
                      if not path.isfile(deppath):
                          logger.debug(
                              "[build target] changed %r missing dependency %r",
                              docname,
                              deppath,
                          )
                          changed.add(docname)
                          break
                      depmtime = _last_modified_time(deppath)
                      if depmtime > mtime:
                          logger.debug(
                              "[build target] outdated %r from dependency %r: %s -> %s",
                              docname,
                              deppath,
                              _format_modified_time(mtime),
                              _format_modified_time(depmtime),
                          )
                          changed.add(docname)
                          break
                  except OSError:
                      # give it another chance
                      changed.add(docname)
                      break
  
      return added, changed, removed
  
imports: from __future__ import annotations
  import functools
  import os
  import pickle
  import time
  from collections import defaultdict
  from copy import copy
  from os import path
  from typing import TYPE_CHECKING, Any, Callable, NoReturn
  from sphinx import addnodes
  from sphinx.environment.adapters import toctree
  from sphinx.errors import BuildEnvironmentError, DocumentError, ExtensionError, SphinxError
  from sphinx.locale import __
  from sphinx.transforms import SphinxTransformer
  from sphinx.util import DownloadFiles, FilenameUniqDict, logging
  from sphinx.util.docutils import LoggingReporter
  from sphinx.util.i18n import CatalogRepository, docname_to_domain
  from sphinx.util.nodes import is_translatable
  from sphinx.util.osutil import canon_path, os_path
label_desc: Use image node_id 15 for calling the BuildEnvironment obj's underlying member method code with example usage: obj.get_outdated_files(config_changed) and returns: added,  changed,  removed