code: def load_from_files(
      files,
      globs: Optional[Dict[str, Any]] = None,
      set_up: Optional[Callable[[Any], None]] = None,
      tear_down: Optional[Callable[[Any], None]] = None,
  ) -> doctest.DocFileSuite:
      """Creates a doctest suite from the files list.
  
      Args:
        files: A list of file paths to test.
        globs: The global namespace the tests are run in.
        set_up: Run before each test, receives the test as argument.
        tear_down: Run after each test, receives the test as argument.
  
      Returns:
        A DocFileSuite containing the tests.
      """
      if globs is None:
          globs = {}
  
      # __fspath__ isn't respected everywhere in doctest so convert paths to
      # strings.
      files = [os.fspath(f) for f in files]
  
      globs["_print_if_not_none"] = _print_if_not_none
      # Ref: https://docs.python.org/3/library/doctest.html#doctest.DocFileSuite
      return doctest.DocFileSuite(
          *files,
          module_relative=False,
          parser=FencedCellParser(fence_label="python"),
          globs=globs,
          setUp=set_up,
          tearDown=tear_down,
          checker=FencedCellOutputChecker(),
          optionflags=(
              doctest.ELLIPSIS
              | doctest.NORMALIZE_WHITESPACE
              | doctest.IGNORE_EXCEPTION_DETAIL
              | doctest.DONT_ACCEPT_BLANKLINE
          ),
      )
  
file_path: tensorflow-upstream/tensorflow/tools/docs/fenced_doctest_lib.py
imports: import ast
  import doctest
  import os
  import re
  import textwrap
  from typing import Any, Callable, Dict, Iterable, Optional
  import astor
  from tensorflow.tools.docs import tf_doctest_lib
label_desc: Use image node_id 1 for calling a global function with example usage: load_from_files(files, globs, set_up, tear_down) and returns: doctest